GBM - Introduction

Overview

The Generalised Bitmap Module (GBM) is a library capable of loading and saving bitmap files in a variety of popular bitmap file formats. Programs may be written to use this library, and thus be able to access a variety of file formats without actually knowing what format the pictures are in, or any details about file format itself.

Additionally the GBM package contains of a number of other components:

Platforms

GBM is available for several platforms, namely OS/2, Windows, Linux, DOS and AIX.

Note:
The version provided here is so far only supported on OS/2 (32bit), Windows (32/64bit) and Linux (32/64bit). Though it shouldn't be a problem to compile it for other x86/X64 platforms as it uses pure ANSI C/C++ code. You can get versions for other platforms supporting a smaller feature set on the homepage of the initial author Andy Key.

Enhancements

Many enhancements have been applied compared to the original version provided by Andy Key:

GBM format handler library

Command line tools


JBIG support (extension to base version)

The Open Source (GPL) library JBIG-Kit 2.0 can be used to build GBM with JBIG support. Try looking for the library at:

I (Heiko Nitzsche) have donated gbmjbg.c to GBM. This file allows GBM to use the JBIG-Kit 2.0 library.

GBM may be compiled up either with or without JBIG support. If you use the JBIG enabled variety of GBM in your project, please beware of the patenting issues:

Users of Non-GPL compatible software linking against GBM.DLL should study potential licensing issues. GBM.DLL can be built without JBIG support by disabling it in the main GBM makefile (e.g. gbm\makefile.xxx\makefile.yyy) if necessary.

This code has been tested on OS/2, Linux and Windows.

JPEG support

The Independant JPEG Group have generously allowed others to use their source code to their JPEG handling library. The only condition of use is that the IJG must be credited for their work. Try looking for this library at:

Martin Lisowski has generously donated his gbmjpg.c to GBM. This file allows GBM to use the IJG 8d library. I (Heiko Nitzsche) implemented some enhancements.

GBM may be compiled up either with or without JPEG support. If you use the JPEG enabled variety of GBM in your project, you must credit the IJG. This code has been tested on OS/2, Linux and Windows.

JPEG2000 support (extension to base version)

The Open Source library OpenJPEG 1.5.1 can be used to build GBM with JPEG2000 support. Try looking for the library at:

I (Heiko Nitzsche) have donated gbmj2k.c to GBM. This file allows GBM to use the OpenJPEG 1.5.1 library.

GBM may be compiled up either with or without JPEG2000 support. If you use the JPEG2000 enabled variety of GBM in your project, you should credit the Open Source project for OpenJPEG. This code has been tested on OS/2, Linux and Windows.

PNG support (extension to base version)

The official Open Source reference libraries Libpng 1.5.13 and Zlib 1.2.7 can be used to build GBM with PNG support. In order to support animated PNGs the APNG patch may be used. Try looking for these libraries at:

I (Heiko Nitzsche) have donated gbmpng.c and gbmmap.c to GBM. These files allow GBM to use the Libpng 1.5.13 library.

GBM may be compiled up either with or without PNG support. If you use the PNG enabled variety of GBM in your project, you should credit the Open Source projects for Libpng and Zlib. This code has been tested on OS/2, Linux and Windows.

TIF support (replacement of base version)

The official Open Source reference library Libtiff 3.9.5 can be used to build GBM with TIF support. Required are Zlib 1.2.7, the IJG Group lib IJG 8d that is also used for standard JPEG support in GBM and the JBIG-Kit 2.0 library that is also used for standard JBIG support in GBM. Try looking for these libraries at:

I (Heiko Nitzsche) have donated gbmtif.c and gbmmap.c to GBM. These files allow GBM to use the Libtiff 3.9.5 library.

GBM may be compiled up either with or without TIF support. If you use the TIF enabled variety of GBM in your project, you should credit the Open Source projects for Libtiff, Zlib, IJG and JBIG-Kit. This code has been tested on OS/2, Linux and Windows.

PBM support (extension to base version)

I (Heiko Nitzsche) have donated gbmpbm.c to GBM. This file allows GBM to read and write black/white PBM (binary P4, ASCII P1) files. This code has been tested on OS/2, Linux and Windows.

PGM support (enhancement of base version)

I (Heiko Nitzsche) have donated gbmpgm.c to GBM. This file allows GBM to read and write 8bpp and 16bpp greyscale PGM (binary P5, ASCII P2) files. This code has been tested on OS/2, Linux and Windows.

PPM support (replacement of base version)

I (Heiko Nitzsche) have donated gbmppm.c to GBM. This file allows GBM to read and write unpalettised 24 and 48 bpp multipage RGB PPM (binary P6, ASCII P3) files. This code has been tested on OS/2, Linux and Windows.

PNM support (extension to base version)

I (Heiko Nitzsche) have donated gbmpnm.c to GBM. This file allows GBM to read and write PNM (binary P4,P5,P6, ASCII P1,P2,P3) files. This code has been tested on OS/2, Linux and Windows.

XPM support (extension to base version)

I (Heiko Nitzsche) have donated gbmxpm.c and gbmxpmcn.c to GBM. These files allow GBM to read and write XPM2 and XPM3 files. This code has been tested on OS/2, Linux and Windows.

Camera RAW support (extension to base version)

The Open Source library LibRaw 0.14.7 can be used to build GBM with RAW support. Try looking for this library at:

I (Heiko Nitzsche) have donated gbmraw.c to GBM. This file allows GBM to use the LibRaw 0.14.7 library.

GBM may be compiled up either with or without RAW support. If you use the RAW enabled variety of GBM in your project, you should credit the Open Source project for LibRaw. LibRaw 0.14.7 is based on DCRAW 9.15 from Dave Coffin. This code has been tested on OS/2, Linux and Windows.

Related Code

GBM was originally written as the file handling part of Andy Key's homebrew ray tracer, RT.

From time to time I notice people (other than myself) using GBM either in its precompiled DLL form, or by recompiling bits of the source. Sometimes people email me to let me know. Of course, simply using the code unmodified makes it easier for you to pick up improvements in the code, as and when they happen. Here are some example applications using GBM code.

GBM.DLL is used unmodified on OS/2 or eComStation by:


GBM.DLL is used unmodified on Windows by:


GBM code is internally used by: