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.

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

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