Rasterimage library

C++ library for reading and manipulation of GIF/PNG/JPEG images,

by Kasper Peeters, Max Stekelenburg and Jim Treadway.
part of project
Mnemonic


Library overview

The rasterimage library provides a small set of C++ classes dealing with GUI-independent reading and manipulation of raster images. It can read GIF, PNG and JPEG data streams including transparency and alpha channel information. It is push-based, so progressive conversion is possible. All decoders make use of existing libraries; the rasterimage library is simply a clean C++ wrapper on top of them. Additional decoder modules for other data types can easily be plugged in.

In addition, some algorithms for image manipulation are provided. In particular, images can be scaled and image blending is planned for the near future.

The rasterimage library is spin-off of the mnemonic browser project.

Manual

The main class rasterimage can be fed any stream of data that represents an image and all of the decoding will be handled automatically. So you can do

rasterimage myimg;
fstream     mystr("image.jpg");
char        buffer[1024];
long        length;

while((length=mystr.read(buffer,1024))) {
   myimg.write(buffer,length);
   }
Download and installation

In order to compile and use the library, you need to have the following additional software installed:

Required:

Optional: In order to install the library, cd into the mnemonic-lib-rasterimage directory and do
./autogen
make
make install
The usual GNU configure options (eg. --prefix) can be passed to autogen.

Alternatively, if you do not want to compile the library yourself, you can get binary packages in the following formats:

Mailing list and bug reports

There is no separate mailing list for lib-rasterimage but questions and bug reports can be send to the mnemonic discussion list, available at disc@mnemonic.org.