JPEG Overview


Package Name

DvmJpeg

Description

Dalì provides primitives for decoding and encoding of a JPEG image.

A JPEG image begins and ends with a SOI (Start of Image) and EOI (End of Image) marker. In betwee, a JPEG Image have an optional table section (Huffman table, quantization table) followed by a Frame Header. THe Frame header always exists and contains information such as the width and height of the image. The Frame header is then followed by a series of scans.

A Scan may specifies its own huffman tables and quantization tables, in which case it will overwrite the tables specified before in the bitstream. A Scan always contains a scan header, which specifies information about the scan, such as which table to use, how many components are there etc. Scan header is followed by scan data, which contains the encoded image.

In Dali, the frame header is represented by the JpegHdr abstraction. This JpegHdr also contains the huffman tables and the quantization tables, since only one valid set of tables can be present at any time.

JpegScanHdr includes information from the scan header in the BitStream. Tables encountered while parsing a scan is updated into JpegHdr.

The scan data representing the compressed image is stored as ScImages, after it is parsed from the BitStream.

Detailed Specification

Tcl specification
C API specification

Dependencies

Needs DvmBasic

Example

  • Decoding JPEG to a PPM file [ tcl | C ]
  • Encoding JPEG from a PPM file [ tcl | C ]

  • Last Updated :

    Copyright © 1997-1998 by Cornell University. See the file license.txt for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.