Main Menu

bad image

Started by Archive, May 12, 2010, 08:54:07 AM

Previous topic - Next topic

Archive

[Originally posted by vik on 2007-07-27 14:37:41-07]

Dear Phil,

You have been a really big help in all of my metadata and image problems. I can't thank you enough on how much knowledge I have gained about still imagery and metadata through your forum. I again have another problem with an image. When I try to modify say the caption field. exifTool returns

perl exiftool -description="test" bad070724-F-0870p-012.jpg

Error: Corrupted JPEG image -

o image files updated

1 files weren't updated due to errors

I would really appreciate if you could find what could be wrong with the following jpg.

 http://download.yousendit.com/C85597F94F8E96B1

Regards,

Vik

Archive

[Originally posted by exiftool on 2007-07-27 14:54:20-07]

The size of the APP1 segment in this image is incorrect -- it doesn't
span the full size of the segment.  For this reason, a JPEG parser will
likely not be able to find the image data in this file.  However,
the data is there, and the file is recoverable if the APP1 segment
size is repaired.

To repair the file, change the two bytes at offset 0x16 in the
file from 0x30bc to 0x310c.  After doing this you can view and
edit the image normally.

- Phil

Archive

[Originally posted by exiftool on 2007-07-27 15:02:05-07]

I just noticed that the ThumbnailLength value is also wrong by 0x50
bytes, so the ThumbnailImage is truncated but otherwise the image
is OK after this repair.

But this gives us a clue as to why the image is corrupted.  The
originating software got the size of the ThumbnailImage wrong, so
it calculated the size of the APP1 segment incorrectly (it thought
it would be 0x50 bytes smaller than it actually was).  So this was
definitely a software bug, and not a problem with a file transfer
corruption.

- Phil