| Dateikopf: | 1. Wort | 4d4d Motorola (high order first) |
| 4949 Intel (low order first) | ||
| 2. Wort | 002a Versionsnummer (konstant) | |
| 3. + 4. Wort | Offset des ersten IFD (Image File Directory) | |
| IFD: | 1. Byte | Anzahl der Tags im IFD, jedes Tag besteht aus 12 Bytes |
| Aufbau eines Tag: | ||
| 1. Wort | Identifikation des Tags (es gibt 45 Tags) | |
| 2. Wort | Typ der Daten | |
| 1: Byte | ||
| 2: 0-terminierter String von ASCII-Zeichen | ||
| 3: short = 16-Bit unsigned integer (0000-ffff) | ||
| 4: long = 32-Bit unsigned integer (00000000-ffffffff) | ||
| 5: Rational = Bruch aus 2 long-Werten | ||
| 11: float = im IEEE-Format, einfache Genauigkeit | ||
| 12: double = im IEEE-Format, doppelte Genauigkeit | ||
| 3. + 4. Wort | Anzahl der Daten für dieses Tag | |
| 5. + 6. Wort | Tag-Daten | |
| falls mit |
||
| falls mehr als 4 Bytes benötigt: 32-Bit Startadresse für Daten | ||
| Datenblock: | RGB-Werte oder Indizes (ggf. komprimiert) für die Farbtabelle |
| Offset | Bedeutung | Wert |
| 0100 | ImageWidth | z.B. 814 |
| 0101 | ImageLength | z.B. 517 |
| 0102 | Bits per Sample | z.B. 8, ggf. Zeiger auf 3 shorts |
| 0103 | Compression | 1 keine Komprimierung |
| 2 CCITT Gruppe 3 (nur bei Schwarz/Weiß) | ||
| 3 CCITT Gruppe T4 (nur bei Schwarz-Weiß) | ||
| 4 CCITT Gruppe T6 (nur bei Schwarz/Weiß) | ||
| 5 LZW | ||
| 6 JPEG | ||
| 32773 Packbit mit Lauflängen-Kodierung | ||
| 0106 | Photometric | 0 S/W mit 0=Weiß, wachsende Nummern gegen Schwarz |
| Interpretation | 1 S/W mit 0=Schwarz, wachsende Nummern gegen Weiß | |
| 2 RGB-Farbbild, pro Pixel drei Farbwerte, 0,0,0=Schwarz | ||
| 3 Palettenbild, pro Pixel ein Index in Palette | ||
| 4 Transparenzmaske für ein weiteres Bild | ||
| 5 CMYK-Farbsystem, pro Pixel 4 Farbwerte | ||
| 6 YUV-Farbsystem, pro Pixel Luminanz + 2 Chrominanz | ||
| 0111 | Strip Offset | Startadresse des Datenblocks (meistens $0008) |
| 0112 | Orientation | 1 horizontal, beginnend oben links |
| 0115 | Samples per Pixel | 3 bei RGB-Bildern |
| 1 sonst | ||
| 0116 | Rows per Strip | wenn 1 Block: Bildhöhe |
| wenn |
||
| 0117 | Strip Byte Counts | wenn 1 Block: Anzahl der Bytes im Block |
| wenn |
||
| 011a | X Resolution | Zeiger auf 2 long Werte, zB. 300 1 |
| 011b | Y Resolution | Zeiger auf 2 long Werte, zB. 300 1 |
| 0128 | Resolution unit | 1 keine Einheit |
| 2 Inch | ||
| 3 Zentimeter | ||
| 011c | Planar Configuration | 1 RGBRGBRGB ... |
| 2 RRRR... GGGG.... BBBB.... | ||
| 0140 | Color map | Anzahl der Einträge + Startadresse |
| Jeder Farbwert 0 |
| Position 0: | ||||||
| 4d4d | Motorola | |||||
| 002a | Versionsnr. (konstant) | |||||
| 0013 | 43ba | Offset des IFD $001343ba = 1262522 | ||||
| Position 8: | ||||||
| ebe9 | e7e2 | e4c0 | b3bd | 9a9c | a387 | Beginn der RGB-Werte, insgesamt 814*517*3 Bytes |
| 9178 | 5294 | 724b | 8d6f | 4b8e | 7453 | |
| a79e | 6da8 | a06f | a19b | 759d | a486 | |
| a6ac | 8aa2 | aa92 | a7ac | 9ba5 | a995 | |
| ... | ||||||
| ... | ||||||
| ... | ||||||
| Position 1262522: Beginn des Image File Directory | ||||||
| 000b | $000b = 11 Tags zu je 12 Bytes | |||||
| 0100 | 0003 | 0000 | 0001 | 032e | 0000 | Breite, 1 short, Wert 3*256 + 2*16 + 14 = 814 |
| 0101 | 0003 | 0000 | 0001 | 0205 | 0000 | Höhe, 1 short, Wert 2*256 + 0*16 + 5 = 517 |
| 0102 | 0003 | 0000 | 0003 | 0013 | 4444 | Bits per sample, 3 short, Adresse $134444=1262660 |
| 0103 | 0003 | 0000 | 0001 | 0001 | 0000 | Compression, 1 short, Wert=1 (keine Kompression) |
| 0106 | 0003 | 0000 | 0001 | 0002 | 0000 | Photometric, 1 short, Wert=2 (RGB-Farbbild) |
| 0111 | 0004 | 0000 | 0001 | 0000 | 0008 | StripOffsets,1 long, Wert=8 (Startadresse) |
| 0112 | 0003 | 0000 | 0001 | 0001 | 0000 | Orientierung,1 short, Wert = 1 (zeilenweise links/oben) |
| 0115 | 0003 | 0000 | 0001 | 0003 | 0000 | Samples per Pixel, 1 short, Wert=3 (RGB) |
| 0116 | 0004 | 0000 | 0001 | 0000 | 0205 | Rows per Strip, 1 long, Wert $205 = 517 (Zeilen) |
| 0117 | 0004 | 0000 | 0001 | 0013 | 43b2 | StripByteCounts, 1 long, Wert = 1262514 (Bytes) |
| 011c | 0003 | 0000 | 0001 | 0001 | 0000 | Planar Konfiguration, 1 short, Wert=1 (RGBRGB...) |
| 0000 | 0000 | Ende IFD, kein weiteres IFD | ||||
| Position 1262660: | ||||||
| 0008 | 0008 | 0008 | jeweils 8 Bit pro Farbwert | |||
| Vorspann | 8 Bytes |
| 814 * 517 RGB-Tripel | 1262514 Bytes |
| IFD 11 * 12 + 12 | 144 Bytes |
|
|
1262666 Bytes |
| Position 0: | ||||||
| 4d4d | Motorola | |||||
| 002a | Versionsnr. (konstant) | |||||
| 0006 | 6be | Offset des IFD $00066bee = 420846 | ||||
| Position 8: | ||||||
| fe68 | bd52 | 6f6f | 6f6f | 0101 | 01f4 | Beginn der Indizes, insgesamt 814*517 Bytes |
| 5252 | e952 | 2abd | 522a | 5252 | b252 | |
| 0000 | 016f | 076f | 01bd | e952 | 3877 | |
| ea3a | 3838 | 38a1 | 0101 | 3a38 | 01be | |
| . | ||||||
| . | ||||||
| Position 420846: Beginn des Image File Directory | ||||||
| 000c | $000c = 12 Tags zu je 12 Bytes | |||||
| 0100 | 0003 | 0000 | 0001 | 032e | 0000 | Breite, 1 short, Wert $32e = 814 |
| 0101 | 0003 | 0000 | 0001 | 0205 | 0000 | Höhe, 1 short, Wert $205 = 517 |
| 0102 | 0003 | 0000 | 0001 | 0008 | 0000 | Bits per sample, 1 short, Wert = 8 (Adresse) |
| 0103 | 0003 | 0000 | 0001 | 0001 | 0000 | Compression, 1 short, Wert=1 (keine Kompression) |
| 0106 | 0003 | 0000 | 0001 | 0003 | 0000 | Photometric, 1 short, Wert=3 (Palette) |
| 0111 | 0004 | 0000 | 0001 | 0000 | 0008 | StripOffsets,1 long, Wert=8 (Startadresse) |
| 0112 | 0003 | 0000 | 0001 | 0001 | 0000 | Orientierung,1 short, Wert=1 (zeilenweise l.o.) |
| 0115 | 0003 | 0000 | 0001 | 0001 | 0000 | Samples per Pixel, 1 short, Wert=1 (Palette) |
| 0116 | 0004 | 0000 | 0001 | 0000 | 0205 | Rows per Strip, 1 long, Wert $205 = 517 (Zeilen) |
| 0117 | 0004 | 0000 | 0001 | 0006 | 6be6 | StripByteCounts,1 long, Wert = 420838 (Bytes) |
| 011c | 0003 | 0000 | 0001 | 0001 | 0000 | Planar Konfiguration, 1 short, Wert=1 (RGBRGB..) |
| 0140 | 0003 | 0000 | 0300 | 0006 | 6c84 | Colormap, $300 = 768 short, beginnend bei $66c84 |
| 0000 | 0000 | Ende IFD, kein weiteres IFD | ||||
| Position: $66c84 = 420996 | ||||||
| Palette mit 768 Doppelbytes | ||||||
| b8b8 | a8a8 | 1010 | 3c3c | 0808 | 2424 | |
| b4b4 | a8a8 | 1c1c | 9898 | 6868 | 3838 | |
| 3c3c | 5858 | 2c2c | 7070 | 6464 | 8080 | |
| . | ||||||
| . | ||||||
| 3030 | 1414 | 1010 | 3030 | 2020 | 3c3c | |
| 7070 | 2828 | d8d8 | 1010 | 2828 | 2020 | |
| 7474 | 1414 | acac | a8a8 | e4e4 | e4e4 |
| Vorspann | 8 Bytes |
| 814 * 517 Indizes | 420838 Bytes |
| IFD 12 * 12 + 6 | 150 Bytes |
| Palette 3 * 256 * 2 | 1536 Bytes |
|
|
422532 Bytes |