Muy buenas, la verdad es que estoy empezando a estudiar como es el algoritmo de compresión jpeg, he encontrado sobrada información en la web para implementarlo, pero ahora viene el problema y la pregunta. No he conseguido encontrar información sobre como es la cabecera de un archivo .jpeg ¿alguno sabe como es o alguna pagina donde se exponga? ¿se conoce la cabecera? porque a lo mejor estoy buscando algo propietario y no lo voy a encontrar...
En fin, yo seguire buscando y si encuentro algo (aunque ya no se me ocurre que mas combinaciones de palabras ponerle a google) yo mismo lo posteare.
Muchas gracias.
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
Cita de: Ole en 23 Julio 2006, 16:44 PM
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
menua curradita tas metido... esto y todo lo que descubras, se queda para la posteridad