JPEG 포멧 헤더 정보

|
Start of Image (SOI) marker -- two bytes (FFD8)

JFIF marker (FFE0)


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
Define Quantization table marker (FFDB)


the first two bytes, the length, after the marker indicate the number of bytes, including the two length bytes, that this header contains
until the length is exhausted (loads two quantization tables for baseline JPEG)
the precision and the quantization table index -- one byte: precision is specified by the higher four bits and index is specified by the lower four bits
precision in this case is either 0 or 1 and indicates the precision of the quantized values; 8-bit (baseline) for 0 and  up to 16-bit for 1
the quantization values -- 64 bytes
the quantization tables are stored in zigzag format
Define Huffman table marker (FFC4)


the first two bytes, the length, after the marker indicate the number of bytes, including the two length bytes, that this header contains
until length is exhausted (usually four Huffman tables)
index -- one byte: if >15 (i.e. 0x10 or more) then an AC table, otherwise a DC table
bits -- 16 bytes
Huffman values -- # of bytes = the sum of the previous 16 bytes
Start of frame marker (FFC0)


the first two bytes, the length, after the marker indicate the number of bytes, including the two length bytes, that this header contains
P -- one byte: sample precision in bits (usually 8, for baseline JPEG)
Y -- two bytes
X -- two bytes
Nf -- one byte: the number of components in the image
3 for color baseline JPEG images
1 for grayscale baseline JPEG images
Nf times:
Component ID -- one byte
H and V sampling factors -- one byte: H is first four bits and V is second four bits
Quantization table number-- one byte
The H and V sampling factors dictate the final size of the component they are associated with. For instance, the color space defaults to YCbCr and the H and V sampling factors for each component, Y, Cb, and Cr, default to 2, 1, and 1, respectively (2 for both H and V of the Y component, etc.) in the Jpeg-6a library by the Independent Jpeg Group. While this does mean that the Y component will be twice the size of the other two components--giving it a higher resolution, the lower resolution components are quartered in size during compression in order to achieve this difference. Thus, the Cb and Cr components must be quadrupled in size during decompression.

Start of Scan marker (FFDA)


the first two bytes, the length, after the marker indicate the number of bytes, including the two length bytes, that this header contains
Number of components, n -- one byte: the number of components in this scan
n times:
Component ID -- one byte
DC and AC table numbers -- one byte: DC # is first four bits and AC # is last four bits
Ss -- one byte
Se -- one byte
Ah and Al -- one byte
Comment marker (FFFE)


the first two bytes, the length, after the marker indicate the number of bytes, including the two length bytes, that this header contains
whatever the user wants
End of Image (EOI) marker (FFD9

Trackback 0 And Comment 5
  1. Favicon of https://gpg.tistory.com BlogIcon 처음처럼 2007.04.17 03:14 신고 address edit & del reply

    ^^ 이런 난해한걸 알아야 하는 경우는 모바일이기 때문이겠지? ^^;;
    PC에서는 Inter Jpeg Library 1.51(마지막 free 버젼이라지?)이라는 놈이 있다는 것만 알면 끝인데 말이지;;;

  2. Favicon of http://bloodrain.tistory.com BlogIcon bloodrain 2007.04.19 17:05 신고 address edit & del reply

    또 왠 암호랴..-_-;

    • Favicon of https://ryan.tistory.com BlogIcon ryan 2007.04.21 21:45 신고 address edit & del

      먹고 살려다 보니.. 쩝...

  3. Favicon of http://www.moncleroutletespain.com/ BlogIcon moncler online 2013.01.05 22:37 address edit & del reply

    Selon le secrétaire d'état à la fonction publique Georges Tron, http://www.moncleroutletespain.com/ moncler outlet, interrogé sur les retards intervenus à la SNCF pendant les vacances de No, http://www.moncleroutletespain.com/ http://www.moncleroutletespain.com/?l, http://www.moncleroutletespain.com/ moncler chaquetas, il faut un "examen très approfondi" dans l'entreprise, http://www.moncleroutletespain.com/ moncler españa.Related articles:


    http://fortes.tistory.com/34 http://fortes.tistory.com/34

    http://princeps.tistory.com/5 http://princeps.tistory.com/5