The client side ICL (image converter library) provides several features to enable the conversion and basic manipulation of
images. Conversions can be made from images stored in files or descriptors to CFbsBitmap
objects, or from CFbsBitmap
and CFrameImageData
objects to files or descriptors. Features of the image converter library include:
Standard decoders that can decode single or multiframe images, images with bitmasks, images with in-image or in-frame comments.
Support for progressive decoding.
Functions to decode images stored in files or descriptors.
Standard encoders that can encode single frame images and images with in-image comments.
Functions to manipulate image properties such as scale, rotation, dithering and progressive decoding.
Advanced thread control for encoders and decoders.
A general overview of how the image converter library interacts with other components is shown below.
Image encoding is the process of taking a bitmap stored in a CFbsBitmap
, converting it to a specified format and writing the output to a file or descriptor. Typical sources of bitmap data are cameras,
paint applications and so on. The formats that are supported by default are shown in the table in Overview.
The encoding process as shown in the diagram above highlights the use of plugins to provide the encoding functionality. The
CImageEncoder
object is created specifying the source image and encoder plugin as parameters. The Convert()
function then encodes the image using the methods provided by the plugin. The results of the conversion are then saved to
a file or descriptor.
Image decoding is the process of taking an image stored in a file or descriptor, converting it from a specified format and
writing the output to a CFbsBitmap
. The formats that are supported by default are shown in the table in Overview.
The decoding process as shown in the diagram above highlights the use of the plugins to provide the decoding functionality.
The CImageDecoder
object is created specifying the source image and decoder plugin as parameters. The Convert()
function then decodes the image using the methods provided by the plugin. The results of the conversion are then saved to
a CFbsBitmap
.
Note: In the diagram above an additional component is shown for decoding, the ECom plugin resolver. If no plugin can be found using the parameters specified when creating the decoder object, the ECom plugin resolver attempts to work out which plugin to use by reading the header information of the source image.
There is a second type of image decoder called CBufferedImageDecoder
. This provides some additional functionality over that provided by CImageDecoder
, but the underlying architecture is still the same. For more information on CBufferedImageDecoder
see Buffered decoding.
How to use ICL is described in greater detail in the sections listed below:
ICL client side architecture - brief overview of the architecture of the image converted library client side classes.
Overview - general overview of ICL, synchronous and asynchronous methods, active objects and concurrency issues.
Image decoding - frame information and data, still image decoding, animated image decoding, progressive decoding and buffered decoding.
Image encoding - encoding/decoding feature comparison, image encoding.
Additional information - dithering, enabling progressive decoding, MIME type and plugin reporting, threading, memory usage, error handling and performance considerations.