The JasPer software supports several popular codecs. In some cases, the support is native (i.e., built-in to the JasPer library itself). In other cases, the support is provided indirectly through external software dependencies. The sections that follow describe the various codecs supported by JasPer in more detail.
Some encoder and decoder options are generic in the sense that they are essentially independent of the codec. Typically, encoders and decoders tend to ignore unrecognized options (although a warning might be issued for such options). So, it is not usually problematic to specify an unsupported option to an encoder or a decoder.
The following generic options are supported by some encoders:
The following generic options are supported by some decoders:
One of the most popular image formats on the Microsoft Windows platform is Microsoft's BMP format. The BMP codec in JasPer was written without the benefit of the BMP format specification from Microsoft. This means that the BMP support will inevitably not work correctly for all valid BMP files.
The BMP encoder does not support any special options.
The BMP decoder supports the following generic options:
The BMP decoder does not support any options beyond generic ones.
The HEIC format is quite popular on Apple platforms. The support is experimental and likely has numerous bugs.
The HEIC encoder supports the following special options:
The HEIC decoder supports the following special options:
The HEIC decoder does not support any generic options.
One of the two image formats specified in the JPEG-2000 Part-1 standard (i.e., ISO/IEC 15444-1 [iso15444p1]) is the so called "JP2" format.
The JP2 encoder supports all of the same options as the JPC encoder.
The JP2 decoder supports all of the same options as the JPC decoder.
One of the two image formats specified in the JPEG-2000 Part-1 standard (i.e., ISO/IEC 15444-1 [iso15444p1]) is the so called JPEG-2000 code stream format. The JPC codec in JasPer implements this format.
The design of the JPEG-2000 codec implementation was driven by several key concerns: execution speed, memory usage, robustness, portability, modularity, maintainability, and extensibility. In some cases, however, during the design process, modularity, portability, and understandability of the code were weighed more heavily than execution speed and memory usage. Code understandability and portability were critical considerations since this software was intended to be used as a reference implementation of the JPEG-2000 Part-1 codec in the JPEG-2000 Part-5 standard [iso15444p5].
Since the JPEG-2000 standard does not specify any means for encoding color space information in a JPEG-2000 code stream, the decoder must make certain assumptions about the color space of an image. If accurate color representation is important, the JPEG-2000 code stream format should not be employed. The JPEG-2000 JP2 format should be used instead.
The JPC encoder supports the following special options:
mode=$m. Set the coding mode to $m. The argument $m must have one of the following values:
If lossless coding is desired, the integer mode must be used. By default, the integer mode is employed. The choice of mode also determines which multicomponent and wavelet transforms (if any) are employed.
prg=$p. Set the progression order to $p. The argument $p must have one of the following values:
By default, LRCP progressive ordering is employed. Note that the RPCL and PCRL progressions are not valid for all possible image geometries. (See [iso15444p1] for more details.)
The JPC decoder supports the following special options:
The following generic options are supported:
All rates are specified in terms of compression factors (i.e., as reciprocals of compression ratio) and not as actual bit rates! Although image coding folks frequently use the number of bits per pixel to specify rate, this quantity is often inconvenient to use when dealing with images that have differing sample precisions. Furthermore, the number of bits per pixel is not well defined for multicomponent images with distinct subsampling factors. The compression factor, however, is independent of sample precision and well defined for all types of images. For these reasons, JasPer uses the compression factor and not the number of bits per pixel to specify rates.
For lossy coding, one of the most popular image formats is specified in the JPEG standard (i.e., ISO/IEC 10918-1 [iso10918p1]). In JasPer, the JPG codec implements this format.
The JPEG support in JasPer requires the JPEG library from the Independent JPEG Group (IJG). For legal reasons, the IJG JPEG library source code is not included with JasPer. The source code for this library can be downloaded from the IJG web site (i.e., http://www.ijg.org).
The JPG encoder supports the following special options:
The JPG encoder does not support any generic options.
The JPG decoder supports the following special options:
The JPG decoder supports the following generic options:
The JPEG-2000 Verification Model software employs a non-standard format called PGX. In JasPer, this format is handled by the PGX codec. The PGX format can only handle single components images, and consequently, is of limited use.
The PGX encoder does not support any generic or special options.
The PGX decoder supports the following special options:
The PGX decoder supports the following generic options:
The MIF format is not a standard format. This format was invented solely for the purpose of testing the JasPer software. The support for the MIF format is experimental. It is intended to be used for advanced testing of the JasPer JPEG-2000 codec implementation. It is strongly recommended that this codec not be enabled/used in code running in environments where security is a concern.
The MIF encoder does not support any generic or special options.
The MIF decoder does not support any generic or special options.
On UNIX platforms, the Portable Pixmap/Graymap/Bitmap (PNM) format is quite popular for coding image data. The PNM codec in JasPer supports this format. In JasPer, the support for the PNM/PGM/PPM format is complete. Therefore, the use of this format is favored over the BMP format. A (nonstandard) extension has also been added to the support for the PNM format so that it can handle images with signed sample values.
The PNM encoder supports the following special options:
The PNM decoder supports the following special options:
The PNM decoder supports the following generic options:
One popular image format on Sun workstations is the Sun Rasterfile format. The RAS codec in JasPer implements this format.
The encoder does not support any special options.
The RAS decoder supports the following special options:
The RAS decoder supports the following generic options: