The Image Conversion Library (ICL) is very useful for any application that needs to do some image manipulation.
The ICL utilizes the ECom framework to identify the correct plugins and thus all ICL plugins are also ECom plugins.
3. ICL
Image Conversion Library
based on active objects, to support encoding
and decoding image files
conversion of an image in a well-defined image
format into a native Symbian OS bitmap
conversion of a native Symbian OS bitmap into a
well-defined image format.
image transformations (rotation, scaling, etc.)
applied to native Symbian OS bitmaps or directly
to an image in a well defined format.
7. Image Decoding
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 CImageDecoder object is created specifying the
source image and decoder plugin as parameters.
The CImageDecoder::Convert() function then decodes
the image using the methods provided by the plugin.
The results of the conversion are then saved to a
CFbsBitmap.
8. Architectural Overview
The ICL JPEG Decoder is implemented as ECOM plugin,
which uses the ICL framework for JPEG conversion.
9. The key player in image decoding is the
CImageDecoder class. This API is an interface
to an extendable plug-in-based system. The
plug-in management tasks are handled by
ECOM.
The API can be used in just three simple steps:
1. Create an image decoder object by providing
a factory method with image data.
2. Initiate the image-conversion process.
3. Wait for a request completion and handle the
conversion result.
10. Data Path
JPEG Decoder plugin (CJpegDecoder) is derived from CImageDecoderPlugin and
JPEG Decoder codec(CJpegReadCodec) is derived from CImageReadCodec
12. Image Encoding
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.
The CImageEncoder object is created specifying the
source image and encoder plugin as parameters.
The CImageEncoder::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.
13. Architectural Overview
The JPEG Encoder is implemented as an ECOM plugin,
working under Symbian’s Image Converter Library (ICL)
Framework .
14. The CImageEncoder API shares many usage patterns
and data structures with the CImageDecoder API.
Its basic usage scenario is essentially the same:
1. An encoder object is to be created by using one of the
synchronous factory methods
2. Some optional encoding parameters may be adjusted
synchronously.
3. An asynchronous encoding process is initiated by calling
CImageEncoder::Convert().
4. The application waits for the request to be accomplished
and makes use of the output data in cases when no
error has been reported.
15. Data Path
JPEG Encoder plugin (CJpegEncoder) is derived from CImageEncoderPlugin and
JPEG Encoder codec(CJpegWriteCodec) is derived from CImageWriteCodec
16. Image File Formats
JPEG : Joint Photographic Expert group
JFIF : JPED File Inerchange Format
Exif : Exchangeable Image File Format
TIFF : Tagged Image File format
RAW :Raw Image format
PNG : Portable Network Graphics
GIF : Graphics Interchange Format
BMP : Windows Bitmap
17. Important Docs
Imaging JPEG Decode JPEG Encoder
For the details on Symbian ICL framework, check the SDK Documentation.
Hinweis der Redaktion
The Image Conversion Library (ICL) is very useful for any application that needs to do some image manipulation. The ICL utilizes the ECom framework to identify the correct plugins and thus all ICL plugins are also ECom plugins. The main use cases for the ICL are: >> conversion of an image in a well-defined image format into a native Symbian OS bitmap >> conversion of a native Symbian OS bitmap into a well-defined image format. >> image transformations (rotation, scaling, etc.) applied to native Symbian OS bitmaps or directly to an image in a welldefined format.
Client APIs The client APIs form the top-level abstraction of the ICL. In Symbian OS v7.0s there are client APIs for the decoding and encoding of images, as well as the rotation and scaling of bitmaps. ICL framework The ICL framework provides a communication layer between the client APIs and the actual ICL plugins, and all plugin control is performed via this layer. The underlying architecture is subdivided into two further layers. The relay layer provides a connection between the underlying client API classes and the core framework. The relay is mainly used to provide thread encapsulation for the ICL when threaded decoding or encoding is employed. All inter-thread communication is performed by this layer, allowing the Client API classes and the core framework to be ignorant of all threading. The core framework is essentially a centralized place for storing data and for achieving the functionality associated with the ICL itself. In normal usage, it is the core framework that performs all plugin instantiation and control. This framework communicates with the ICL plugins via the abstract plugin API that all ICL plugins have to implement. ICL plugins The ICL plugins provide the actual decoding and encoding functionality to the ICL. The ICL framework provides four abstract classes from which all ICL plugins are derived. These are CImageDecoderPlugin and CImageEncoderPlugin for decoding and encoding respectively, and corresponding codec classes, CImageReadCodec and CImageWrite - Codec. The intended split in responsibilities is as follows. The decoder and encoder plugin classes are designed to deal with the interface to the ICL framework, the retrieval and writing of image headers, and additional non-frame data, such as text fields. The read and write codec classes are designed to deal with the main decoding and encoding stages for individual frames. Provided the virtual functions of these classes are implemented, there is no reason why a plugin writer could not have more complicated processing chains inside a plugin. For example, a codec class could forward messages to one or more sub-codec classes, to provide specialized processing.
Description The Image conversion 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 conversion function 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 encoder 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 encoder and decoders.
Description 1.JPD plugin is created using the FileNewL method. While creating JPD plugin, input data control is passed to the ICL framework. 2. Conversion process is started using the Convert method; from then ICL framework will take the control of conversion. 3. JPEG Decoder’s ReadCodec receives the input data from ICL framework using the ProcessFrameL method. 4. JPD Read Codec will send (map) the input data to DSP Socket Node using the SCML. After Socket Node (SN) completes conversion (decoding), SCML will receive t the message from SN and pass to JPD Read code as an event through callback function. 5.Output data will be stored in the Bitmap. Decoding completion request will be notified to ICL framework using HandleProcessFrameResult.
Decription : 1. JPD plugin is created using the FileNewL method. While creating JPD plugin, input data control is passed to the ICL framework. 2.Conversion process is started using the Convert method; from then ICL framework will take the control of conversion. 3. JPEG Decoder’s ReadCodec receives the input data from ICL framework using the ProcessFrameL method. 4. JPD Read Codec will send (map) the input data to DSP Socket Node using the SCML. After Socket Node (SN) completes conversion (decoding), SCML will receive the message from SN and pass to JPD Read code as an event through callback function. 5. Output data will be stored in the Bitmap. Decoding completion request will be notified to ICL framework using HandleProcessFrameResult.
Image file size —expressed as the number of bytes—increases with the number of pixels composing an image, and the colour depth of the pixels. Image compression uses algorithms to decrease the size of a file. Image file compression There are two types of image file compression algorithms: lossless and lossy. Lossless compression algorithms reduce file size without losing image quality, though they are not compressed into as small a file as a lossy compression file. When image quality is valued above file size, lossless algorithms are typically chosen. Lossy compression algorithms take advantage of the inherent limitations of the human eye and discard invisible information. Most lossy compression algorithms allow for variable quality levels (compression) and as these levels are increased, file size is reduced. At the highest compression levels, image deterioration becomes noticeable as "compression artifacting".