Image Conversion Library Overview

This document introduces you to the Image Conversion functionality.

Purpose

Image Conversion functionality supports many features like encoding, decoding, scaling, rotating, producing mirror image, flipping and cropping images.

Image Conversion Library Details

To use Image Conversion, you must obtain necessary binaries in the form of DLL file to implement the image encoding and the image decoding functions.

DLL LIB Short Description

imageconversion.dll

imageconversion.lib

These files are used for implementing image conversion operation.

Architectural Relationship

Image Conversion is primarily used for Image Encoding and Image Decoding. The following diagram shows how the Image Encoding and the Image Decoding interacts with other components.

Figure 1. Image Conversion system diagram

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.

Key Image Conversion Classes

The key classes are

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. Typical sources of bitmap data are cameras and paint applications. 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.

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 .

Image Processor

Image Processor is an interface to process the decoded image using the CImageProcessor class.

Using Image Conversion

The Image Conversion functionality is used for the following:

  • Rotate, crop, mirror and flip an image frame during decode operation.

  • Scaling with reduction factor of an image during decode operation.

  • Decode an image by requesting pixel data block by block.

  • Decode an image from a descriptor or a file.

  • Decode an image using a mask for the image with transparency.

  • Decode an image using separate thread.

  • Decode a JPEG image thumbnail.

  • Decode a GIF multi-frame image.

  • Decode an image that supports YUV format into an image frame.

  • Turning OFF and ON dithering during decode operation of the image.

  • Encode a bitmap or an image frame into a descriptor or a file.

  • Encode an image frame by passing pixel data block by block.

  • Rotate, mirror and flip an image during encode functionality.

  • Rotate a bitmap image.

  • Scaling a bitmap image with or without a mask.