LEADTOOLS For .NET Class Library Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.28
Support 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 the image files does the following:

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

The LEAD CMP compression format was created by LEAD Technologies, Inc., and 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 save one 8-bit file and one 24-bit file. The result is one much smaller file size 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. (This is available only in the LEADTOOLS CMW Plug in. 12 and 16-bit formats also require the Document/Medical capabilities).

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

JPEG Compliant

LEADTOOLS for WPF 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.) To change the orientation of an image, you must modify the ViewPerspective of the LEAD image using the RasterImage.ChangeViewPerspective method, found in LEADTOOLS Raster Imaging Pro toolkits.

JPEG 2000 Compliant

LEADTOOLS for WPF can load and save JPEG 2000 files. You can load 24-48 bit color images (images with 25-47 bits/pixel will be loaded as 48-bit). You can load 8-16 bit grayscale images. Images with 9-11 bits/pixel will be loaded as 12-bit while images with 13-15 bit are loaded as 16 bits/pixel.

You can save 24 and 48-bit color images and 8, 12 and 16-bit grayscale images.

LEADTOOLS for WPF supports JPEG2000 stream (J2K) JP2 and JPX format files. LEADTOOLS for WPF also supports all JP2 and JPX boxes .

4 and 1-bit Images

JPEG and LEAD CMP compression are intended for use with high resolution images, and 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 LEADTOOLS for WPF 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 for WPF 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 for WPF supported formats.

Related topics: