User Manual

J

Updated on

JFIF

JFIF is short for JPEG Interchange Format and is the actual format designation for a JPEG file. The term JPEG describes the algorithm for compressing within a JFIF file.

JPEG

The acronym JPEG is short for Joint Photographic Expert Group. In 1982 ISO established the Photographic Experts Group with the goal of developing methods for efficiently transmitting text and still images.

JPEG is the most broadly know compression algorithm of images for the Web as well as for prepress processes. The algorithm is a lossy procedure that was mainly developed for compressing half-tone images (color depth of min. 8 bit per channel) and not for compressing black-white or induced images or general data. In comparison to other compression procedure JPEG is not an individual compression method but a library of methods that's suitable to the users' needs. JPEG offers a standard for data compression but isn't a file format.

The compression of JPEG is controllable across multiple JPEG quality levels. Theoretically and according to the specification there's the possibility to carry out a lossless compression. In practice this procedure is rarely conducted due to missing parametrization in grafic or PDF editing programs. Rather the adjustable five quality levels (the number is dependent on the used application) are used for the different Workflows. The quality levels can either be of maximal quality (=low compression rate) to low quality (=high compression). For the use in print it can be said that with a maximal quality a compression rate of 1:4 and with the lowest quality a compression rate of 1:25 is possible.

The demands on JPEG were enormous. The format was expected to be suitable for diverse areas of application, the compression should have been adjustable independently from the color depth and size or resolution of the image by a factor. Furthermore, JPEG was expected to be integrated easily into Software and Hardware

In order to meet the requirements, JPEG was designed in such a way that a multi-stage process is necessary for compression. These coding stages are:

  1. Conversion to the YCrCb color space: In order to come closer to the goal of generating optimum quality, the output data must be converted into a form that allows a distinction to be made between relevant and irrelevant content. For this purpose, the image is converted into a color space in which the brightness information can be stored independently of the color values. The color space of JPEG is YCrCb, where the Y-axis represents the luminance and the color values (color difference components) are encoded in the other axes.
    The reason for this conversion is that the differences in brightness can be better distinguished by the human eye than the differences in color.
  2. Subsampling: As the human eye perceives information about brightness better than change in color information, the brightness signal Y is saved in full resolution. The reduction of the resolution takes place in color axis by subsampling, therein two to four pixel of each color component are summarized in an averaging process to one pixel. The brightness is fully maintained. This explains why grayscale images - which lack color information - cannot be compressed so well by JPEG. Depending on the quality level, the color information is switched to the same level, which leads to a flattening of the details.
  3. Discrete Cosine Transformation: In a further step, each color component created after subsampling is encoded using the DCT compression method. Each component is broken down into 8 x 8 pixel blocks and mathematically transferred to a frequency space using cosine transformation. The result is an output matrix that has the same size as the input matrix. Therefore, there is no data reduction. In the output matrix, the first element describes the DC component, while the remaining 63 components describe the AC component of the discrete-time input signal.
  4. Quantization - weighting of the contents: The individual matrix elements are weighted using predefined or self-generated quantization tables and divided by constant values. Depending on which quantization is used, image information is lost. Higher frequency components (= darker image areas) are weighted more heavily than lower frequency components, which is why darker image areas tend to fall by the wayside during quantization. The choice of JPEG compression (maximum, high, medium, low, low) therefore results in different quantization being used. As with DCT, the original data volume is retained after quantization. Images that have already been compressed with JPEG should therefore not be saved again as JPEG, as re-encoding will result in a loss of image information.
  5. Lossless compression: After quantization, the DC (first element of the 8 x 8 matrix) and AC coefficients (the remaining 63 coefficients of the matrix) must be placed in a sequential order. The AC and DC coefficients are coded using different tables (VLI and VLC coding). Finally, the coefficient chain is compressed without loss using Huffman coding. Frequently occurring symbol sequences are assigned short code words (removal of redundant information).

Summary: JPEG is and remains the most common compression method for storing halftone information for all color depths from 8-bit grayscale, 24-bit RGB to 32-bit images. Compressing 1-bit images is possible, but is negligible in terms of quality limitations. Only at medium and high compression rates do block artifacts appear, which significantly impair the image quality.

Technically speaking, JPEG is a lossy and asymmetric compression method. In PDF, JPEG is addressed via the DCTDecode-Filter . Parameterization of the filter is provided.

ISO/IECIS 10918

JPEG was established as an international standard under this ISO standard in 1992.

JPEG2000

JPEG2000 is characterized by better mathematical processes compared to JPEG. The new standard was introduced in summer 2000 under the name JPEG2000 Image Coding System. The file extension of JPEG2000 is, quite unexpectedly, jpf.

The goals that were to be achieved by JPEG were already ambitious at the time. With JPEG2000, the proven format was to meet further requirements:

  • Higher compression than is possible with JPEG.
  • A multiple increase in quality - especially in the low bit depth range (high frequency components) - should be achieved.
  • A reduction in the formation of block artifacts should be achieved.
  • A loss-free method for processing black and white images must be guaranteed.
  • JPEG2000 should not only be excellently suited for images, but also for encoding computer graphics or entire files with text and image data.
  • Improved transferability by integrating a higher error tolerance with regard to transfer errors.
  • The possibility of progressive transmission, i.e. splitting into different resolution levels, must be integrated.

The invention of 2000 as JPEG2000 can be described by the following characteristics:

  • The basis of JPEG2000 coding is the wavelet algorithm. The result of the wavelet transformation are wavelet coefficients that describe the image in different resolutions.
  • JPEG2000 can compress both lossless and lossy halftone and black-and-white images. Lossless compression is the basis for a compression method that should not only be used for pixel images.
  • The different "layers" in a JPEG2000 file describe the different quality levels of an image. This means that for a higher quality image, only the quality required for the process is used rather than the entire image. This could also be used in pre-press, as proof printing usually does not require such high-resolution information as exposure. The important thing here is that both output forms work with the same file.
  • It is also interesting that so-called regions of interest (ROI) can be defined within an image - these must be mapped via masks - which can be used to achieve partially higher or lower compression qualities.
  • In contrast to JPEG, transparencies and alpha channels can be saved with JPEG2000. While the transparencies are retained when reopened in Adobe Photoshop, the alpha channels (masks) are missing.
  • Up to 256 color channels with a color depth of 1 bit to 16 bits per color channel are supported. This means that CMYK information can also be saved in addition to RGB images.
  • With JPEG, indexed image stocks are still limited to a color table of 256 colors; with JPEG2000, this color table can be extended to 1024 colors.
  • JPEG2000 is a separate file format. The sRGB color space is activated as standard within the format. However, ICC color profiles and therefore also eciRGB color profiles or output profiles such as ISOCoated_v2 can be integrated into the file.
  • JPEG2000 also supports metadata. This means that date entries, copyright notices, author, keywords, title designations and freely definable meta information as well as all EXIF information can be stored in the file.
  • The internal structure of the format in boxes (Signature Box, Header Box, Contiguous Codestream Box) means that the required content can be accessed more quickly without having to decompress beforehand.

Summary: The advantages of being able to accommodate a high compression rate with less visible loss of quality in a file are so tempting in practice that no manufacturer should be able to avoid JPEG2000. JPEG2000 has found its way into PDF with the PDF 1.5 specification. JPEG2000 is no magician, but on average a reduction of 25% to 50% in file size is possible compared to JPEG. Regardless of which color space, which color depth, which resolution and whether paths, alpha channels and color profiles need to be embedded, JPEG2000 would be the format that comes closest to an "egg-laying wool-milk sow" in the range of file formats.

Technically speaking, JPEG2000 is one of the lossless or lossy and asymmetric compression methods. Internally, a distinction is made between JP2 and JPX.

In PDF, JPEG2000 is addressed via the JPXDecode-Filter. This can only be applied to image XObjects. Parameterization of the filter is provided. The option of setting these in the graphic interface of graphic, layout and PDF editors is not available to the full extent and is therefore not usable.

JPEG2000 compressed PDF files are generally smaller and of better quality than JPEG files. Rendering this content can result in a longer rendering time, which is why the compression algorithm is not implemented in many programs.

Previous Article I
Next Article L