A C++ class library for image file decoding and manipulation.
BrothersoftEditor: paintlib is a portable C++ class library for image loading, saving and manipulation. Images can be loaded from BMP, GIF, IFF, JPEG, PCX, PGM, PICT, PNG, PSD, SGI, TGA, TIFF and WMF files and saved in BMP, JPEG, PNG and TIFF formats. Image manipulation can be done either through filters implemented in filter classes or by directly accessing the bitmap bits. Full C++ source is provided.
paintlib works on bitmaps. The Abstract class PLBmp defines an interface for bitmap storage and manipulation. The actual Details of storage are defined in derived classes. The contents of a bitmap can be changed either via Filter objects or by directly accessing the bits. Among others, filters for resizing, cropping, rotating and blurring an image are included. PLBmp implements color depth conversion from and to 1, 8, 24 and 32 bpp. The standard EQuality and assignment operators are implemented as well and convert between the derived classes transparently. paintlib provides basic classes for pixels, points and rectangles.
Filters encapsulate operations on bitmaps. To the user of the library, a filter is similar to a function that can be called for a bitmap. However, filters are independent of the actual bitmap class: Each filter works with every bitmap class. In addition, putting filters in separate classes allows you to use filters as part of a command pattern: you can put filters in a queue and parameterize algorithms with different filters, among others.
-Image File Decoding
-Image File Encoding
The encoding classes store images. Currently implemented are BMP, TIFF (via libtiff), JPEG (via libjpeg) and PNG (via libpng). Data storage is handled by data sink classes. A data sink for Disk Files is provided; others can be implemented.