Compression Using LEAD and JPEG Formats

Compression of color and grayscale graphic image files is useful because such 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 be as much as 200 times smaller than their original size!

The LEAD CMP compression format was created by LEAD Technologies, Inc., and 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 or 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 low-end-users or to save one 8-bit file and one 24-bit file. The result: one single, smaller file 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-bit, 12-bit and 16-bit grayscale images are supported in this format. (12-bit and 16-bit formats require the Document/Medical capabilities).

Compression is controllable, allowing compression and image quality to be adjusted to match the needs of your application. The CodecsCmpQualityFactorPredefined Enumeration describes how the quality factors are used.

JPEG Compliant

LEADTOOLS .NET is fully JPEG-compliant. Any file using compression that is compliant with the JPEG Interchange File Format can be viewed and converted. Images that are not fully compliant with the JPEG specification may be displayed upside-down. (The JPEG Interchange File Format specifies that all images must be stored top-down.) Change the orientation of an image by modifying its view perspective using the RasterImage.ChangeViewPerspective method.

JPEG 2000 Compliant

All LEADTOOLS Imaging Pro, Document Imaging, and Medical Imaging toolkits can read and write JPEG 2000 file formats (JP2 and J2K) and read and parse JPX files. You can load 24-48 bit color images (images with 25-47 bits/pixel will be loaded as 48-bit). You can also load 8-16 bit grayscale images. Images with 9-11 bits/pixel will be loaded as 12-bit while images with 13-15 bits/pixel are loaded as 16 bits/pixel. You can save 24 and 48-bit color images and 8, 12 and 16-bit grayscale images.(12-bit and 16-bit formats require Document/Medical capabilities).

LEADTOOLS Document and Medical Imaging toolkits also add support for writing JPX files and manipulating JPX boxes, frames, GML Data, and other advanced JPX features.

LEADTOOLS supports loading and saving JPEG XR (JXR) lossy and lossless compression. This file format supports QFactor. Possible values range between 2 and 255 (lossy compression), or value 0 (lossless compression).

The LEADTOOLS Medical](/sdk/product-overview) toolkits support loading and saving [JPEG-LS (JLS) lossless and near lossless image files at 8, 12, and 16BPP grayscale. Additionally, it supports loading and saving non-interleaved, line-interleaved, and sample-interleaved 24BPP (RGB) color images. JPEG-LS (JLS) files supports the QFactor , which can range between 2 and 255 (lossy compression), or equal 0 (lossless compression).

4- and 1-bit Images

JPEG and LEAD CMP compression are intended for use with high resolution images, and are impractical for use with 4-bit or 1-bit images. When working with 4-bit or 1-bit images, use the CCITT, LEAD 1-bit, RLE, LZW, or 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 methods compress 8-bit grayscale as 8-bit grayscale JPEG or CMP images.

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

Summary of All Supported Image File Formats describes the LEAD and JPEG compression formats, in addition to the other formats that LEADTOOLS supports.

Related topics:

Help Version 20.0.2018.3.2
Products | Support | Contact Us | Copyright Notices
© 1991-2018 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Imaging, Medical, and Document