Compression Using LEAD and JPEG Formats

Compression of color and grayscale graphic image files is useful because the files are big. They can range from 100 kilobytes to more than 200 megabytes. Compressing image files does the following:

By incorporating LEAD and JPEG image compression, you can develop applications that would be impractical otherwise. Image files can be reduced to as much as 200 times smaller than their original size.

The LEAD CMP compression format was created by LEAD Technologies, Inc. It delivers a much smaller file size and better image quality than other compression techniques, including JPEG.

LEAD's CMP file format allows for decompression to a 24-bit medium at 24-bit color and to an 8-bit medium at 8-bit color without sacrificing image quality. This eliminates the need to convert all images to 8 bits in order to support the low end users or to an 8-bit file and a corresponding 24-bit file. The result is one file (instead of two), and one that is much smaller than the original. that can be viewed on a 24-bit video card at 24-bit true color, as well as on an 8-bit VGA card at 256 colors.

LEAD's CMW format uses Wavelet CMP compression. Currently, 24 color images and 8, 12 and 16-bit grayscale images are supported in this format. (12 and 16-bit formats also require one of the Document and Medical toolkits).

JPEG and LEAD Compressed Formats describes the LEAD and JPEG compression formats.

The amount of compression is controllable, allowing the compressed image quality to match the needs of your application. Compression Quality Factors describes how quality factors are used.

JPEG Compliant

LEADTOOLS is fully JPEG-compliant. Any file using compression that is compliant with the JPEG Interchange File Format can be viewed and converted.

However, some images that are not fully compliant with the JPEG specification will be displayed upside-down. (The JPEG Interchange File Format specifies that all images must be stored top-down.) You can change the orientation of an image by modifying the ViewPerspective flag in the LEAD bitmap handle.

JPEG 2000 Compliant

LEADTOOLS toolkits supports JPEG 2000 code stream (J2K), JP2, and JPX format files. All LEADTOOLS Imaging, Document Imaging, and Medical Imaging toolkits can read/write JPEG 2000 file formats (JP2 and J2K), and read JPX files LEADTOOLS Document and Medical Imaging toolkits also add support for writing JPX files, as well as manipulating JPX boxes, frames, GML Data, and other advanced JPX features.

LEADTOOLS reads and saves 24- and 48-bit color images and 8, 12 and 16-bit grayscale images. Images of 9–11 bits/pixel are loaded as 12-bit, 13–15 bit images are loaded as 16 bits/pixel, and images of 25-47 bits/pixel are loaded as 48-bit.

4 and 1-bit Images

Both JPEG and LEAD CMP compression are intended for use with high resolution images. They are impractical for use with 4- or 1-bit images.

You can use the CCITT, LEAD 1-bit, RLE, LZW, and ZIPLib compression methods available in many of the LEADTOOLS supported formats.

8 and 24-bit Images

Using JPEG, JPEG2000 and LEAD CMP or CMW compression, color images are 24-bits per pixel, and grayscale images are 8-bits per pixel. Therefore, to compress an 8-bit color image, the internal JPEG, JPEG2000 and LEAD CMP or CMW compression functions must convert the 8-bit data into raw RGB 24-bit before compressing it as a color image.

Compressing the original 24-bit image will result in a smaller file size and higher quality than compressing an optimized 8-bit color image.

LEADTOOLS functions compress 8-bit grayscale as 8-bit grayscale JPEG or CMP images.

You can use any of the RLE, LZW and ZIPLib (PNG) compression methods available in many of the LEADTOOLS supported formats.

For more information, refer to:

JPEG and LEAD Compressed Formats

Introduction: Bitmaps in Memory and in Files

Programming with JPEG 2000 Features

Programming with JPX Features

Raster Image Functions: Working with JPEG 2000

Raster Image Functions: Working with JPX

JPEG and LEAD File Comments

JPEG 2000 File Comments

JPX File Comments

Files and File Formats

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.