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

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

LEAD. This is the LEAD CMP compressed format for grayscale and color images. This format results in smaller files and better image quality than industry-standard formats. In addition, LEAD also supports CMW files, which use Wavelet CMP compression in 8-bit, 12-bit, and 16-bit grayscale and 24-bit color. (12-bit and 16-bit grayscale images are only supported in the Document/Medical toolkits.)

Progressive LEAD. This is a LEAD format that is useful for transmitting images, because the first part of the file contains the full dimensions of the image. Therefore, in a paint-while-load routine, you can display the whole image, and then progressively clarify it as the rest of the file loads. In this format you can read and write 8 or 24 bits per pixel, where 8 is for grayscale and 24 is for color.

Lossy JFIF. This is the JPEG File Interchange Format. LEADTOOLS supports YUV 4:4:4, 4:2:2, and 4:1:1 color spacing, and YUV 4:0:0 for grayscale.

Lossless JFIF. This is the JPEG File Interchange Format. LEADTOOLS supports 8-bit, 12-bit, and 16-bit grayscale and 24-bit color spacing. Please note that not all applications support Lossless JPEG. Before saving a file using Lossless JPEG, make sure your reader supports it.

Both JPEG 4:4:4 and Lossless JPEG will be recognized when getting file information. (12-bit and 16-bit grayscale images are only supported in the Document/Medical toolkits.)

Progressive JPEG. This is a JFIF format that is useful for transmitting images, because the first part of the file contains the full dimensions of the image. Therefore, in a paint-while-load routine, you can display the whole image, and then progressively clarify it as the rest of the file loads. LEADTOOLS supports YUV 4:4:4, 4:2:2, and 4:1:1 color spacing, and YUV 4:0:0 for grayscale.

Lossy JTIF. This is the JPEG Tagged Interchange Format. LEADTOOLS supports YUV 4:4:4, 4:2:2, and 4:1:1 color spacing, and YUV 4:0:0 for grayscale.

Lossless JTIF. This is the JPEG Tagged Interchange Format. LEADTOOLS supports 8-bit, 12-bit, and 16-bit grayscale and 24-bit color spacing. Please note that not all applications support Lossless JPEG. Before saving a file using Lossless JPEG, make sure your reader supports it.

Both TIFF JPEG 4:4:4 and Lossless JPEG will be recognized when getting file information. (12-bit and 16-bit grayscale images are only supported in the Document/Medical toolkits.)

J2K - Lossy or Lossless. This is a JPEG 2000 Format. LEADTOOLS can read 8-bit, 12-bit, and 16-bit grayscale and 24-bit and 48-bit color images. LEADTOOLS can save 8-bit, 12-bit and 16-bit grayscale and 24-bit, 32-bit, 48-bit and 64-bit color images. The J2K format contains only a stream of image data. (12-bit and 16-bit grayscale support is only in Document/Medical toolkits)

JP2 - Lossy or Lossless. This is a JPEG 2000 Format. LEADTOOLS can read 8-bit, 12-bit, and 16-bit grayscale and 24-bit, 32-bit, 48-bit and 64-bit color images. LEADTOOLS can save 8-bit, 12-bit and 16-bit grayscale and 24-bit, 32-bit, 48-bit and 64-bit color images. The JP2 format contains a stream of image data, plus extra data about the organization and contents of the file. (12 -and 16-bit grayscale support is only in Document/Medical toolkits)

JPX (JPEG 2000 Part 2). The JPX (JPEG 2000 Part 2) file format is especially useful for document, medical, and satellite imagery archiving systems. All LEADTOOLS Imaging Pro, Document Imaging, and Medical Imaging toolkits can read /write JPEG 2000 file formats (JP2 and J2K) and read/parse JPX files. 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.

JPM (JPEG 2000 Part 6). This (JPEG 2000 Part 6) compound image format is developed by the Joint Photographic Experts Group (JPEG). It is especially useful for document, pre-press, and fax-like images. It contains layered still images that use FAX (Group 3-1D, Group 3-2D, Group 4), JBIG1, JBIG2, JPEG Lossy, JPEG Lossless and J2K encodings. JPM file format inherits features from its parent JP2, JPEG 2000 Part 1 (Core). This file format supports stamps, but does not support QFactor, progressive loading or Sub-formats. LEAD supports loading multipage files in this format. For more information, refer to JPM file format.

JLS - JPEG-LS Lossless and Near Lossless. This raster image format is developed by the Joint Photographic Experts Group (JPEG). JPEG-LS algorithm is based on LOCO-l (low complexity lossless compression for images). LEAD supports compressing and decompressing lossless and near lossless images. JPEG-LS is popular in medical imaging and used within the DICOM standard. The JLS file format supports loading and saving 8, 12 and 16BPP grayscale images. It also supports three modes of 24-bit (RGB) for loading and saving; non-interleaved, line-interleaved or sample-interleaved. This file format supports QFactor. Possible values can be a value between 2 and 255 (lossy compression), or value 0 (lossless compression. This file format does not support stamps, progressive loading/saving, Sub-formats, or loading/saving multipage files. For more information, refer to JPEG-LS home page and the International Telecommunication Union Recommendation T.87. JLS read/write (save) support is included with Medical toolkits.

TIFJ2K - Lossy or Lossless. This is a Tagged Image File with JPEG 2000 Compression. This file format contains only a stream of image data. LEADTOOLS supports 8-bit, 12-bit, and 16-bit grayscale and 24-bit color spacing. (12-bit and 16-bit grayscale support is only in Document/Medical toolkits)

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 ReadComment function to read comments in an existing file. Before writing a file, you can use the Comments property to set an array of comments to be saved in the file.

Please note that Leadtools.ColorConversion.dll is required for loading JPEG CMYK images and for loading and saving JPEG LAB images.

File constants associated with these file formats are:

Constant Read Support Write Support Description
Jpeg 8, 12, 16 BPP (Grayscale) 24 BPP (Color) 8, 12, 16 BPP (Grayscale) 24 BPP (Color)

JPEG File Interchange Format.

Jpeg411 8 BPP (Grayscale) 24 BPP (Color) 8 BPP (Grayscale) 24 BPP (Color)

JPEG File Interchange Format, 4:1:1.

Jpeg422 8 BPP (Grayscale) 24 BPP (Color) 8 BPP (Grayscale) 24 BPP (Color)

JPEG File Interchange Format, 4:2:2.

JpegLab 24 BPP (Color) 24 BPP (Color)

JPEG File Interchange Format, CieLAB 4:4:4.

JpegLab411 24 BPP (Color) 24 BPP (Color)

JPEG File Interchange Format, CieLAB 4:1:1.

JpegLab422 24 BPP (Color) 24 BPP (Color)

JPEG File Interchange Format, CieLAB 4:2:2.

JpegCmyk 24 BPP (Color) 24 BPP (Color)

JPEG File Interchange Format, CMYK 4:4:4.

JpegCmyk411 24 BPP (Color) 24 BPP (Color)

JPEG File Interchange Format, CMYK 4:1:1.

JpegCmyk422 24 BPP (Color) 24 BPP (Color)

JPEG File Interchange Format, CMYK 4:2:2.

JpegRgb 24 BPP (Color) 24 BPP (Color)

JPEG File Interchange Format, RGB 4:4:4.

Cmp 8 BPP (Grayscale) 24 BPP (Color) 8 BPP (Grayscale) 24 BPP (Color) LEAD CMP compressed format.
Cmw 8, 12, 16 BPP (Grayscale) 24 BPP (Color) 8, 12, 16 BPP (Grayscale) 24 BPP (Color)

LEAD Wavelet CMP compressed format.

J2k Lossy 8, 12, 16 BPP (Grayscale) 24, 32, 48, 64 BPP (Color)
Lossless 8 BPP (Color)
Lossy 8, 12, 16 BPP (Grayscale) 24, 32, 48, 64 BPP (Color)
Lossless 8 BPP (Color)

JPEG 2000 File.

Jp2 8, 12, 16 BPP (Grayscale) 24, 32, 48, 64 BPP (Color) 8, 12, 16 BPP (Grayscale) 24, 48 BPP (Color)

JPEG 2000 Stream.

Jls 8, 12, 16 BPP (Grayscale)
24 BPP (Color)
8, 12, 16 BPP (Grayscale)
24 BPP (Color)
JPEG-LS Lossless and Near Lossless.
JlsLine 24 BPP (Color) 24 BPP (Color) JPEG-LS Lossless and Near Lossless (Line-interleaved).
JlsSample 24 BPP (Color) 24 BPP (Color) JPEG-LS Lossless and Near Lossless (Sample-interleaved).
Jpx Lossy 8, 12, 16 BPP (Grayscale) 24, 32, 48, 64 BPP (Color)
Lossless 8 BPP (Color)
Lossy 8, 12, 16 BPP (Grayscale) 24, 32, 48, 64 BPP (Color)
Lossless 8 BPP (Color)
JPEG 2000 Extension (Part 2).
Jp2 8, 12, 16 BPP (Grayscale) 24, 32, 48, 64 BPP (Color) 8, 12, 16 BPP (Grayscale) 24, 48 BPP (Color) JPEG 2000 Stream.
Jpm 8, 24 BPP JPEG 2000 Extension (Part 6).

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, TIFF - Tagged Image File Format.

Platform Support

Extension Module Value Win32 Win64 Net32 Net64 Linux Android Apple UWP MimeType Friendly Name
Cmp CMP 5 image/jpeg CMP - LEAD Compressed
Cmw CMW 165 image/x-lead-cmw LEAD Wavelet CMP
J2k J2K 164 image/x-jpeg-2000 Jpeg2000 stream with Lossy or Lossless Compression
Jls JLS 356 image/x-jpeg-xr JPEG LS File Format
JlsLine JLS 367 image/x-jpeg-xr JPEG LS Line interleaved File Format
JlsSample JLS 368 image/x-jpeg-xr JPEG LS Sample interleaved File Format
Jp2 J2K 163 image/x-jpeg-2000 Jpeg2000 file with Lossy or Lossless Compression
Jpeg JPG 10 image/jpeg JPEG File Interchange Format - JFIF
Jpeg411 JPG 21 image/jpeg JPEG File Interchange Format 4-1-1
Jpeg422 JPG 23 image/jpeg JPEG File Interchange Format 4-2-2
JpegCmyk JPG 391 image/jpeg JPEG File Interchange Format CMYK 4-4-4
JpegCmyk411 JPG 392 image/jpeg JPEG File Interchange Format CMYK 4-1-1
JpegCmyk422 JPG 393 image/jpeg JPEG File Interchange Format CMYK 4-2-2
JpegLab411 JPG 172 image/jpeg JFIF - JPEG File Interchange Format CieLAB 4-1-1
JpegLab422 JPG 173 image/jpeg JFIF - JPEG File Interchange Format CieLAB 4-2-2
JpegLab JPG 171 image/jpeg JFIF - JPEG File Interchange Format CieLAB 4-4-4
JpegRgb JPG 182 image/jpeg JPEG RGB File Interchange Format JFIF RGB 4-4-4
Jpm JPM 347 JPEG2000 JPM File Format
Jpx JPX 323 image/x-jpeg-2000 JPX - JPEG2000 extension part 2

For a complete list for supported file formats, see Summary of All Supported File Formats.

For details of the file formats supported across products and platforms, refer to File Format Comparison Chart.

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

LEADTOOLS Imaging, Medical, and Document