DjVu Image Files

Photo DjVu Image --- Photo DjVu Image files are best used for encoding photographic images in colors or in shades of gray. The data compression model relies on the IW44 wavelet representation. This format is designed such that the IW44 decoder is able to quickly perform progressive rendering of any image segment using only a small amount of memory. Photo DjVu files are composed of a single "FORM:DJVU" composite chunk. This composite chunk always begins with one "INFO" chunk describing the image size and resolution (see DjVuInfo.h). One or more additional "BG44" chunks contains the image data encoded with the IW44 representation (see IW44Image.h). The image size specified in the "INFO" chunk and the image size specified in the IW44 data must be equal.

Bilevel DjVu Image --- Bilevel DjVu Image files are used to compress black and white images representing text and simple drawings. The JB2 data compression model uses the soft pattern matching technique, which essentially consists of encoding each character by describing how it differs from a well chosen already encoded character. Bilevel DjVu Files are composed of a single "FORM:DJVU" composite chunk. This composite chunk always begins with one "INFO" chunk describing the image size and resolution (see DjVuInfo.h). An additional "Sjbz" chunk contains the bilevel data encoded with the JB2 representation (see JB2Image.h). The image size specified in the "INFO" chunk and the image size specified in the JB2 data must be equal.

Compound DjVu Image --- Compound DjVu Files are an extremely efficient way to compress high resolution Compound document images containing both pictures and text, such as a page of a magazine. Compound DjVu Files represent the document images using two layers. The background layer is used for encoding the pictures and the paper texture. The foreground layer is used for encoding the text and the drawings. Compound DjVu Files are composed of a single "FORM:DJVU" composite chunk. This composite chunk always begins with one "INFO" chunk describing the size and the resolution of the image (see DjVuInfo). Additional chunks hold the components of either the foreground or the background layers.

The main component of the foreground layer is a bilevel image named the foreground mask. The pixel size of the foreground mask is equal to the size of the DjVu image. It contains a black-on-white representation of the text and the drawings. This image is encoded by a "Sjbz" chunk using the JB2 representation. There may also be a companion chunk "Djbz" containing a shape dictionary that defines bilevel shapes referenced by the "Sjbz" chunk.

The foreground colors can be encoded according to two models:

The background layer is a color image, the background color image ncoded by an arbitrary number of "BG44" chunks containing successive IW44 refinements (see IW44Image.h). The size of this image is computed by rounding up the quotient of the mask size by an integer sub-sampling factor ranging from 1 to 12. Most Compound DjVu Images use a background sub-sampling factor equal to 3. Smaller sub-sampling factors are adequate for images with a very rich paper texture. Larger sub-sampling factors are adequate for images containing no pictures.

There are no ordering or interleaving constraints on these chunks except that (a) the "INFO" chunk must appear first, and (b) the successive "BG44" refinements must appear with their natural order. The chunk order simply affects the progressive rendering of DjVu images on a web browser.

Alternative encodings --- Besides the JB2 and IW44 encoding schemes, the DjVu format supports alternative encoding methods for its components.

In addition, the chunk names "BG2k" and "FG2k" have been reserved for encoding the background color image and the foreground color image using the forthcoming JPEG-2000 standard. This capability is not implemented at the moment. The JPEG-2000 standard may even become the preferred encoding method for color images in DjVu.

Alphabetic index Hierarchy of classes


DjVu is a trademark of LizardTech, Inc.
All other products mentioned are registered trademarks or trademarks of their respective companies.