File Formats: JPEG and LEAD Compressed (JPG, J2K, JPX, JP2, CMP, and CMW)

LEADTOOLS reads and writes the following LEAD and JPEG compressed formats:

Both JPEG 4:4:4 and Lossless JPEG will be recognized when getting file information.

12 and 16-bit grayscale images are only supported in the Document and Medical Imaging toolkits.

NOTE: JFIF  4:1:1 and 4:2:2 formats use subsampling for the color components. In the case of 411, the color components for 4 pixels is averaged during compression. This will cause a color shift, but the shift is tolerable for low compression ratios. If you have high compression and repeated savings, then the color shift will increase.  Due to inherent limitations of the JPEG algorithm, the only ways to avoid this are: (a) avoid repeated load and resave, or (b) use 4:4:4  format, which has no subsampling.

Both TIFF JPEG 4:4:4 and Lossless JPEG will be recognized when getting file information.

12 and 16-bit grayscale images are only supported in the Documentand Medical Imaging toolkits.

For general information, refer to Compression Using LEAD and JPEG Formats.

Please note that the LTCLR DLL is required for loading JPEG CMYK images and for loading and saving JPEG LAB images.

File constants associated with this file format are:

Constant

Read Support

Write Support

Description

FILE_CMP

8 BPP (grayscale)
24 BPP

8 BPP (grayscale)
24 BPP

[5] LEAD CMP compressed format.

FILE_JPEG

8, 12, 16 BPP (grayscale)
24 BPP

8, 12, 16 BPP (grayscale)
24 BPP

[10] JPEG File Interchange Format.

FILE_JPEG_411

8 BPP (grayscale)
24 BPP

8 BPP (grayscale)
24 BPP

[21] JPEG File Interchange Format, 4:1:1.

FILE_JPEG_422

8 BPP (grayscale)
24 BPP

8 BPP (grayscale)
24 BPP

[21] JPEG File Interchange Format, 4:2:2.

FILE_JPEG_LAB

24 BPP

24 BPP

[171] JPEG File Interchange Format, CieLAB 4:4:4.

FILE_JPEG_LAB_411

24 BPP

24 BPP

[172] JPEG File Interchange Format, CieLAB 4:1:1.

FILE_JPEG_LAB_422

24 BPP

24 BPP

[173] JPEG File Interchange Format, CieLAB 4:2:2.

FILE_JPEG_RGB

24 BPP

24 BPP

[182] JPEG File Interchange Format, RGB 4:4:4.

FILE_JP2

8, 12, 16 BPP (grayscale)
24, 32, 48 BPP (color)

8, 12, 16 BPP (grayscale)
24, 32, 48 BPP (color)

[163] JPEG 2000 File.

FILE_J2K

8, 12, 16 BPP (grayscale)
24, 32, 48 BPP (color)

8, 12, 16 BPP (grayscale)
24, 32, 48 BPP (color)

[164] JPEG 2000 Stream.

FILE_JPX

8, 12, 16 BPP (grayscale)

24, 32, 48 BPP (color)

8, 12, 16 BPP (grayscale)

24, 32, 48 BPP (color)

[323] JPEG 2000 Extension (Part 2).

FILE_CMW

8, 12, 16 BPP (grayscale)
24 BPP

8, 12, 16 BPP (grayscale)
24 BPP

[165] LEAD Wavelet CMP compressed format.

Required DLL: For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: EXIF - Exif Formats, FPX - Kodak Format, TIFF - Tagged Image File Format.

See Also:

Compression Using LEAD and JPEG Formats

JPEG and LEAD Compressed Formats

Introduction: Bitmaps in Memory and in Files

Programming with JPEG 2000 Features

Raster Image Functions: Working with JPEG 2000

JPEG and LEAD File Comments