File Formats: JPEG and LEAD Compressed (JPG, J2K, JP2, JPM, JLS, 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.

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 are 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.

For general information, refer to Compression Using LEAD and JPEG Formats. For instructions for implementing progressive formats, refer to Controlling Progressive Loads and Saves. JPEG and LEAD files can contain many comment fields of various types. You can use the LFile::ReadComment function to read comments in an existing file. Before writing a file, you can use the LFileSettings::SetComment function to create an array of comments to be saved in the file.

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

File constants associated with this file format are as follows:

Constant Read Support Write Support Description
FILE_CMP 8 BPP (grayscale) 8 BPP (grayscale) [5] LEAD CMP compressed format.
24 BPP (color) 24 BPP (color)
FILE_JPEG 8, 12, 16 BPP (grayscale) 8, 12, 16 BPP (grayscale) [10] JPEG File Interchange Format.
24 BPP (color) 24 BPP (color)
FILE_JPEG_411 8 BPP (grayscale) 8 BPP (grayscale) [21] JPEG File Interchange Format, 4:1:1.
24 BPP (color) 24 BPP (color)
FILE_JPEG_422 8 BPP (grayscale) 8 BPP (grayscale) [23] JPEG File Interchange Format, 4:2:2.
24 BPP (color) 24 BPP (color)
FILE_JPEG_CMYK 24 BPP 24 BPP [391] JPEG File Interchange Format, CMYK 4:4:4.
FILE_JPEG_CMYK_411 24 BPP 24 BPP [392] JPEG File Interchange Format, CMYK 4:1:1.
FILE_JPEG_CMYK_422 24 BPP 24 BPP [393] JPEG File Interchange Format, CMYK 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 Lossy 8, 12, 16 BPP (grayscale) Lossy 8, 12, 16 BPP (grayscale) [163] JPEG 2000 File.
24, 32, 48, 64 BPP (color) 24, 32, 48, 64 BPP (color)
Lossless 8 BPP (color) Lossless 8 BPP (color)
FILE_J2K 8, 12, 16 BPP (grayscale) 24, 32, 48, 64 BPP (color) [164] JPEG 2000 Stream.
24, 32, 48, 64 BPP (color) 8, 12, 16 BPP (grayscale)
FILE_JPM 8, 24 BPP None [347] JPEG 2000 (Part 6) JPM.
FILE_JLS 8, 12, 16 BPP (grayscale) 8, 12, 16 BPP (grayscale) [356] JPEG-LS Lossless and Near Lossless.
24 BBP (color) 24 BBP (color)
FILE_JLS_LINE 24 BBP (color) 24 BBP (color) [367] JPEG-LS Lossless and Near Lossless (Line-interleaved.)
FILE_JLS_SAMPLE 24 BBP (color) 24 BBP (color) [368] JPEG-LS Lossless and Near Lossless.(Sample-interleaved)
FILE_JPX Lossy 8, 12, 16 BPP (grayscale) Lossy 8, 12, 16 BPP (grayscale) [323] JPEG 2000 Extension (Part 2).
24, 32, 48, 64 BPP (color) 24, 32, 48, 64 BPP (color)
Lossless 8 BPP (color) Lossless 8 BPP (color)
FILE_CMW 8, 12, 16 BPP (grayscale) 8, 12, 16 BPP (grayscale) [165] LEAD Wavelet CMP compressed format.
24 BPP (color) 24 BPP (color)

Required DLLs and Libraries

Related Formats

Platforms

Win32, x64.

See Also

Topics

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.