Programming with JPEG 2000 Features
JPEG 2000 is a wavelet-based image compression standard that defines both a code-stream (J2K) and file formats (JP2 and JPX). It uses a hierarchical format to store several resolutions of the image in the same file without duplication. Therefore, a JPEG 2000 compressed image can be sent to a device in the resolution that best fits, without additional storage overhead. The standardized filename extensions are .jp2 (JPEG 2000 Part1, conforming to standard ISO/IEC 15444-1) and .jpx (JPEG 2000 Part2, conforming to standard ISO/IEC 15444-2).
LEADTOOLS JPEG 2000 provides support for loading and saving JPEG 2000 file formats (JP2 and JPX). JPEG 2000 file formats provide greater flexibility and better image quality, especially at higher compression, than standard JPEG.
Image Storage and Image Archive Development
LEADTOOLS JPEG2000 robust features fulfill the demanding requirements of image storage and image archival application development.
In the past, image archives had to store the same image in various sizes and metadata several times to ensure there was an image appropriate to meet future on-demand needs. This required additional storage and organizational overhead.
LEADTOOLS JPEG2000 solves this problem by supporting multiple codestreams per file. It can also store massive amounts of metadata by storing stand complaint XML data. Additionally, a higher resolution codestream can be easily loaded at lower resolutions, making JPEG 2000 ideal for meeting the on-demand needs of image retrieval.
Further, JPEG2000 images can be digitally signed, ensuring that the image and metadata retrieved from the image repository is in its original form and has not been modified. Digital security is often a requirement in today’s mission-critical imaging applications.
J2K Features
J2K flexibility includes the ability to control:
whether or not to transform RGB images to YUV prior to compression;
the type of quantization to use when determining the quantization step size;
the amount of compression;
the size and location of tiles;
the number of resolution levels in the file;
the progression order;
the code block height and width;
whether to use markers to help detect corruption during transmission.
LEADTOOLS provides a FILEJ2KOPTIONS structure for controlling the J2K features listed above. To determine the current settings for these features, use the LFileSettings::GetJ2KOptions function. To change these features, use the LFileSettings::SetJ2KOptions function.
To load J2K images progressively, set the nPasses member of the LOADFILEOPTION structure, just as you would for regular JPEG files.
To get the default settings for J2K features, use the LFileSettings::GetDefaultJ2KOptions function.
JPX (JPEG 2000 Part 2) Features
The JPX (JPEG 2000 Part 2) file format is especially useful for document, medical, and satellite imagery archiving systems . All LEADTOOLS Raster Pro, Document Imaging, and Medical Imaging toolkits can read /parse JPX files. LEADTOOLS Document and Medical Imaging toolkits can also write /update JPX files. JPX support enables you to:
maintain full control of codestreams, frames, and metadata;
append and extract all standard metadata boxes, such as XML, digital signature, and intelletual property;
append and extract additional images (frames);
save lists of bitmaps, such as 3D volumetric encoded slices;
include support for 24 bit RGB and 8, 12-16 bit grayscale* code streams;
add opacity channels;
read and write GML data;
support fragmentation, providing the following benefits:
edit an image, resaving the changed tiles to the end of the file;
distribute images across several disks for faster access;
distribute the image across the Internet, allowing only certain users access to the high quality or high resolution portions of the codestream;
reuse headers from within a codestream across multiple codestreams (to minimize file overhead when storing similar codestreams wihtin the same JPX file).
The L_JP2_FILEINFO structure provides information about JPEG 2000 file contents. The L_JP2_XML_BOX structure provides information for an XML box. For a complete listing of functions that control, read, and manipulate box contents, see Raster Image Functions: Working with JPEG 2000. To determine the current settings for these features, use the LFileSettings::GetJ2KOptions function. To change these features, use the LFileSettings::SetJ2kOptions function.
For more information, refer to:
Compression Using LEAD and JPEG Formats
JPEG and LEAD Compressed Formats
Introduction: Bitmaps in Memory and in Files