[Digikam-devel] [Bug 130525] Saving large (>5M) jpg's result in corrupt file

Andreas Huggel ahuggel at gmx.net
Mon Jul 10 17:20:53 BST 2006


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=130525         




------- Additional Comments From ahuggel gmx net  2006-07-10 18:20 -------
This is what exifprobe says for bad.jpg, note the "INVALID JPEG TAG":

 0x000614f=24911   :    <JPEG_APP13> 0xffed length 44828, Photoshop 3.0 - unknown format (not dumped: use -A)
-0x001106c=69740   :    </JPEG_APP13>
 0x001106d=69741   :    <TAG_0xb060> INVALID JPEG TAG
-0x04389e6=4426214 :  END OF FILE
 000000000=0       :  Start of JPEG (UNKNOWN JPEG compression) primary image [0x0] length 0 (CORRUPTED) (no image)

With the standalone exiv2 utility I can modify and write good.jpg (bot Exif and IPTC metadata) without problems. 

Further, good.jpg (unmodified) starts with 

00000000  ff d8 ff e1 d1 b1 45 78  69 66 00 00 4d 4d 00 2a  |ÿØÿáѱExif..MM.*|
00000010  00 00 00 08 00 0c 01 0e  00 02 00 00 00 1e 00 00  |................|

but bad.jpg starts with:

00000000  ff d8 ff e0 00 10 4a 46  49 46 00 01 01 00 00 01  |ÿØÿà..JFIF......|
00000010  00 01 00 00 ff e1 61 39  45 78 69 66 00 00 4d 4d  |....ÿáa9Exif..MM|

Exiv2 does not insert a JFIF segment, so this image was not written with Exiv2 (only).

Finally, with "dd skip=30 bs=1 if=bad.jpg of=bad.tif count=24881" I can extract the Exif data from bad.jpg and parse it with exiv2 -pt bad.tif and it looks ok.

Andreas



More information about the Digikam-devel mailing list