Reading the JPEG Quantization Table

In an earlier post I refered to a paper by Hany Farid which analyzes quantization tables found in JPEG file headers. As I'd like to introduce his method in my lab I'm taking a closer look.

A detailed description of the JPEG file format can be found in the recommendation CCITT/ITU T.81. I recommend to read at least section B.2.4.1 which defines the format of a quantization table.

I'm using 010 Editor and a publicly available JPEG template. By default this templates colorizes the output; as I prefer a clean black-and-white style I commented out parts of the ChangeColor function.

According to the CCITT/ITU specification the quantization tables will be found in one or multiple DQT subheaders. The following sample shows two quantization tables contained in a single DQT block.

A DQT subheader defines the quantization tables

Each quantization table consists of 64 values. They are marked in blue in the following figure:

Detail view of a quantization table

JPEG files may contain a smaller preview image in an APP1 subheader. This image then contains a set of quantization tables of its own.

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