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 code, 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, DOS, Windows, Linux and AIX.

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

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 6a/IJG 6b library.

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, AIX, Linux and Windows.

PNG support (extension to base version)

The official Open Source reference libraries Libpng 1.2.8 and Zlib 1.2.3 can be used to build GBM with PNG support. 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.2.8 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.

TIF support (replacement of base version)

The official Open Source reference libraries Libtiff 3.8.2 can be used to build GBM with TIF support. Required are Zlib 1.2.8 and the IJG Group lib IJG 6b that is also used for standard JPEG support. 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.8.2 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 and the IJG. This code has been tested on OS/2.

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) files. This code has been tested on OS/2.


Related code

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

His follow-on Modular Renderer package, MR, uses GBM. It does wire-frame, polygon rendering and raytracing.

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: