# Falls Sie eine Website erwarten, aber diesen
# Abschnitt lesen können, löschen Sie bitte das
# _index.htmx_uncode-jpeg
# vom Ende der Adresszeile. Danke!



Lang: de
Title: uncode-jpeg: Macht die Abschnitte von jpeg-Dateien sichtbar
Short Title: uncode-jpeg
Publication date: 2020-05-10

Meta: en
Title: uncode-jpeg: Makes the sections of jpeg files visible
Short Title: uncode-jpeg

+INFO
+Beispiel
+weiter
+Beispiel2

>>INFO de 1.0

<H1>uncode-jpeg: Macht die Abschnitte von jpeg-Dateien sichtbar</H1>

<H2>Download</H2>

<P>
Hier der Quelltext, zusammen mit der kompilierten Version und einem 
Wikipedia-Beispielbild:
<A HREF="200510-uncode-jpeg.tgz">200510-uncode-jpeg.tgz (ca. 100 kB)</A>
<A HREF="200527-uncode-jpeg.tgz">200527-uncode-jpeg.tgz (ca. 110 kB)</A>
</P>
<P>
Es werden längst nicht alle JPEG-Marker unterstützt. In der neuen Version
vom 27. Mai werden die Tabellen-IDs korrekt ausgegeben. In der neuen
Version kann man eine verkleinerte, pure jpeg-Datei mit -o NEUEDATEI.jpg
ausgeben. (Funktioniert nur mit wenigen Dateien)
</P>
<P>
Das Tool hilft, einen guten Überblick über eine jpeg-Datei zu bekommen.
</P>
<P>
Die Programmausgabe sieht z. B. wie folgt aus:
</P>

<<
>>INFO en 1.0

<H1>uncode-jpeg: Makes the sections of jpeg files visible</H1>

<H2>Download</H2>

<P>
Here's the source, together with the compiled binary and a sample image from
Wikipedia:
<A HREF="200510-uncode-jpeg.tgz">200510-uncode-jpeg.tgz (ca. 100 kB)</A>
<A HREF="200527-uncode-jpeg.tgz">200527-uncode-jpeg.tgz (ca. 110 kB)</A>
</P>

<P>
There are lots of unsupported JPEG markers. In the new version (27th of Mai)
Table indices are handled correctly. In the new version you can write a 
stripped version of the file with -o NEWFILE.jpg. (Works only with few files.)
</P>
<P>
This tool helps with getting an overview over a arbitrary JPEG file.
</P>

<P>
The program output looks like this:
</P>


<<

>>Beispiel

<PRE>
Opening file Bilder/SDC16414x.jpg .
Marker   1  @0x     0 +1         : SOI  Start Of Image
Marker   2  @0x     2 -&gt; 0x  1dd7: APPn Application-specific (1 - EXIF/XMP)
   EXIF metadata
   interoperability number = hex 0B 00
Scanning through additional 7617 bytes which are non-consumed yet ...
Marker   2a @0x   f8c +1         : SOI  Start Of Image
Marker   2b @0x   f8e -&gt; 0x  1014: DQT  Define Quantization Table(s) q0, 64x1 B
                                                                     q1, 64x1 B
Marker   2c @0x  1014 -&gt; 0x  11b8: DHT  Define Huffman Table(s) ID 00, #cp:  12
                                                                ID 01, #cp:  12
                                                                ID 10, #cp: 162
                                                                ID 11, #cp: 162
Marker   2d @0x  11b8 -&gt; 0x  11cb: SOF0 Start Of Frame (0 - baseline DCT)
   prec  8, size  160 x  120, component  1: sampling fact. 0x21, table q0
                              component  2: sampling fact. 0x11, table q1
                              component  3: sampling fact. 0x11, table q1
Marker   2e @0x  11cb -&gt; 0x  11d9: SOS  Start Of Scan
                              component  1: huffman tables: ID 00 DC, ID 10 AC
                              component  2: huffman tables: ID 01 DC, ID 11 AC
                              component  3: huffman tables: ID 01 DC, ID 11 AC
                              further flags: 0x00 0x3f 0x00
Marker   2f @0x  1dd5 +1         : EOI  End Of Image
... scanning done
Marker   3  @0x  1dd7 +1         : invalid - ffe3 was not exptected here
Marker   4  @0x  1dd9 +1         : invalid - ffff was not exptected here
Marker   5  @0x  1ddb +1         : SOI  Start Of Image
Marker   6  @0x  1ddd -&gt; 0x  1e63: DQT  Define Quantization Table(s) q0, 64x1 B
                                                                     q1, 64x1 B
Marker   7  @0x  1e63 -&gt; 0x  2007: DHT  Define Huffman Table(s) ID 00, #cp:  12
                                                                ID 01, #cp:  12
                                                                ID 10, #cp: 162
                                                                ID 11, #cp: 162
Marker   8  @0x  2007 -&gt; 0x  201a: SOF0 Start Of Frame (0 - baseline DCT)
   prec  8, size  640 x  480, component  1: sampling fact. 0x21, table q0
                              component  2: sampling fact. 0x11, table q1
                              component  3: sampling fact. 0x11, table q1
Marker   9  @0x  201a -&gt; 0x  2028: SOS  Start Of Scan
                              component  1: huffman tables: ID 00 DC, ID 10 AC
                              component  2: huffman tables: ID 01 DC, ID 11 AC
                              component  3: huffman tables: ID 01 DC, ID 11 AC
                              further flags: 0x00 0x3f 0x00
Marker  10  @0x 11dd8 +1         : invalid - ffe4 was not exptected here
Marker  11  @0x 1ab5d +1         : EOI  End Of Image
Marker  12  @0x 1ab5f -&gt; 0x 1abe5: DQT  Define Quantization Table(s) q0, 64x1 B
                                                                     q1, 64x1 B
Marker  13  @0x 1abe5 -&gt; 0x 1ad89: DHT  Define Huffman Table(s) ID 00, #cp:  12
                                                                ID 01, #cp:  12
                                                                ID 10, #cp: 162
                                                                ID 11, #cp: 162
Marker  14  @0x 1ad89 -&gt; 0x 1ad9c: SOF0 Start Of Frame (0 - baseline DCT)
   prec  8, size 3648 x 2736, component  1: sampling fact. 0x21, table q0
                              component  2: sampling fact. 0x11, table q1
                              component  3: sampling fact. 0x11, table q1
Marker  15  @0x 1ad9c -&gt; 0x 1adaa: SOS  Start Of Scan
                              component  1: huffman tables: ID 00 DC, ID 10 AC
                              component  2: huffman tables: ID 01 DC, ID 11 AC
                              component  3: huffman tables: ID 01 DC, ID 11 AC
                              further flags: 0x00 0x3f 0x00
Marker  16  @0x2a0e7f +1         : EOI  End Of Image
End of file reached.
</PRE>

<<Beispiel

>>weiter de
<P>
<I>Hinweis: es handelt sich nicht um die mitgepackte Beispieldatei!</I>
</P>
<P>
Es handelt sich hierbei um eine "baseline"-jpeg-Datei (baut sich bei langsamen
Verbindungen nach und nach von oben nach unten auf). Der Gegensatz dazu ist
eine "progressive"-jpeg-Datei (enthält anfangs unscharfe Daten, Bild wird
immer schärfer).
</P>

<P>
Man kann problemlos sämtliche Markerinhalte 2-11 löschen; die Marker 1+12-16 
enthalten das eigentliche Bild.
</P>
<P>
Nach der Behandlung mit <CODE>exiftool -APP3:all= -EXIF:all= -APP4:all= SDC16414x.jpg</CODE> stellt sich die Datei so dar (und ist mehr als 5% kleiner):
</P>

>> weiter en
<P>
<I>Remark: this is not the sample file you find in archive!</I>
</P>
<P>
This is a baseline jpeg file (on slow connections renders visibly from top to
bottom). In contrast, a progressive jpeg file would be blurred in the beginning
and get sharper till the end of the transmission.
</P>
<P>
You can delete all contents of markers 2-11; marker 1+12-16 do contain the 
actual image.
</P>
<P>
After invoking <CODE>exiftool -APP3:all= -EXIF:all= -APP4:all= SDC16414x.jpg</CODE> the
file looks like this (and is more than 5% smaller):
</P>

<<
>>Beispiel2

<PRE>
Opening file SDC16414x.jpg .
Marker   1  @0x     0 +1         : SOI  Start Of Image
Marker   2  @0x     2 -&gt; 0x    88: DQT  Define Quantization Table(s) q0, 64x1 B
                                                                     q1, 64x1 B
Marker   3  @0x    88 -&gt; 0x   22c: DHT  Define Huffman Table(s) ID 00, #cp:  12
                                                                ID 01, #cp:  12
                                                                ID 10, #cp: 162
                                                                ID 11, #cp: 162
Marker   4  @0x   22c -&gt; 0x   23f: SOF0 Start Of Frame (0 - baseline DCT)
   prec  8, size 3648 x 2736, component  1: sampling fact. 0x21, table q0
                              component  2: sampling fact. 0x11, table q1
                              component  3: sampling fact. 0x11, table q1
Marker   5  @0x   23f -&gt; 0x   24d: SOS  Start Of Scan
                              component  1: huffman tables: ID 00 DC, ID 10 AC
                              component  2: huffman tables: ID 01 DC, ID 11 AC
                              component  3: huffman tables: ID 01 DC, ID 11 AC
                              further flags: 0x00 0x3f 0x00
Marker   6  @0x286322 +1         : EOI  End Of Image
End of file reached.
</PRE>

<<