Home | All Classes | Grouped Classes | Index | Search

Class CL_PCXProvider

Surface provider that can load PCX files. More...

Derived from: CL_PixelBuffer
Derived by: none
Group: Display (Surface Providers)

#include <ClanLib/display.h>

Construction:

CL_PCXProvider

Constructs a surface provider that can read pcx files.

Detailed description:

The PCX decoder has been modified to load most PCX files (instead of just the ones created by Deluxe Paint IIe). It now support 1,2,4,8, or 24 bit files... and has been tested in all but a few situations.

Technically, the implementation cheats in that it doesnt store images with less than 8 bits per pixel in their native format. It simply converts them to PAL8 pixelformat instead of creating other pixelformats.

Also note that the PCX decoder creates more bytes per line than the image is supposed to contain. We rely on the clipping capabilities of ClanLib to take care of that. Also note that some default palettes were defined in the read_header() method. These definitions might be better placed in palette.h. Since the scope of the PCX_Provider rewrite was limited to the provider itself, no files outside of pcx_provider.h and pcx_provider.cpp were modified.

The PCX decoding code was moved to read_data() and read_header() to make it easier to follow the code (called from perform_unlock()).



Questions or comments, write to the
ClanLib mailing list.