Creo que anda por aqui la cosa, ahora me toca traducir xDD, pero bueno, he avanzado mucho.
En la propia pagina del grupo jpeg se expone la cabecera... algo como esto:
X’FF’, SOI
X’FF’, APP0, length, identifier, version, units, Xdensity, Ydensity, Xthumbnail,
Ythumbnail, (RGB)n
length (2 bytes) Total APP0 field byte count, including the byte
count value (2 bytes), but excluding the APP0
marker itself
identifier (5 bytes) = X'4A', X'46', X'49', X'46', X'00'
This zero terminated string (“JFIF”) uniquely
identifies this APP0 marker. This string shall
have zero parity (bit 7=0).
version (2 bytes) = X'0102'
The most significant byte is used for major
revisions, the least significant byte for minor
revisions. Version 1.02 is the current released
revision.
units (1 byte) Units for the X and Y densities.
units = 0: no units, X and Y specify the pixel
aspect ratio
units = 1: X and Y are dots per inch
units = 2: X and Y are dots per cm
Xdensity (2 bytes) Horizontal pixel density
Ydensity (2 bytes) Vertical pixel density
Xthumbnail (1 byte) Thumbnail horizontal pixel count
Ythumbnail (1 byte) Thumbnail vertical pixel count
(RGB)n (3n bytes) Packed (24-bit) RGB values for the thumbnail
pixels, n = Xthumbnail * Ythumbnail
[ Optional JFIF extension APP0 marker segment(s) - see below ]
•
•
•
X’FF’, SOFn, length, frame parameters
Number of components Nf = 1 or 3
1st component C1 = 1 = Y component
2nd component C2 = 2 = Cb component
3rd component C3 = 3 = Cr component
•
•
•
X’FF’, EOI
Evidentemente esto asi queda muy en el aire. en
www.jpeg.org encontrareis rapido si os interesa.
Otra palabra interesante para buskar sobre el tema es ISO DIS 10918-1
que aproveche, happy hacking