length -- two bytes
identifier -- five bytes: 4A, 46, 49, 46, 00 (the ASCII code equivalent of a zero terminated "JFIF" string)
version -- two bytes: often 01, 02
the most significant byte is used for major revisions
the least significant byte for minor revisions
units -- one byte: Units for the X and Y densities
0 => no units, X and Y specify the pixel aspect ratio
1 => X and Y are dots per inch
2 => X and Y are dots per cm
Xdensity -- two bytes
Ydensity -- two bytes
Xthumbnail -- one byte: 0 = no thumbnail
Ythumbnail -- one byte: 0 = no thumbnail
(RGB)n -- 3n bytes: packed (24-bit) RGB values for the thumbnail pixels, n = Xthumbnail * Ythumbnail