Arrangement of JPEG Quantization Tables

In an earlier post I described the structure of quantization tables in a JPEG file. Closer inspection reveals that there are two different ways to store the information.

Now, here is a sample image:

Sample of 1 DQT segment and 2 tables (118635 bytes)

As it can easily be seen, the file comprises of a single DQT segment. This segment in turn contains two quantization tables.

Segment structure of the sample image.

The JPEG standard allows to define multiple tables in a single segment. Also it is perfectly ok to include multiple DQT segments in a file. Once again the same sample image, with a different ordering of the quantization tables:

Sample image with 2 DQT segments, each one containing a single quantization table (118639 bytes)

And here is the structure of the 2nd file's header:

Segment structure of the second sample image.

There is no obvious difference to be seen between these two images. However, due to the additional segment the second file is 4 bytes larger than the first one.

Whether the quantization table is defined in one or multiple segments could give a weak indication of a camera or image processing software. However, as it can be seen from the example above it is very easy to tamper with this property.

By the way: Multiple DQT segments are not allowed in the preview image which is a part of the EXIF data structure. In version 2.2 of the EXIF standard (JEITA CP-3451) they say:

All quantization tables shall be defined in one DQT marker segment; recording of multiple DQT markers is not allowed.

Archives

Imprint

This blog is a project of:
Andreas Schuster
Im Äuelchen 45
D-53177 Bonn
impressum@forensikblog.de

Copyright © 2005-2012 by
Andreas Schuster
All rights reserved.
Powered by Movable Type 5.12