Corrupt JPEG data: 34608 extraneous bytes before marker 0xda

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
visitor x
Posts: 16
Joined: 2013-07-27T13:26:38-07:00
Authentication code: 6789

Corrupt JPEG data: 34608 extraneous bytes before marker 0xda

Post by visitor x » 2013-08-26T13:33:53-07:00

Code: Select all

identify: Corrupt JPEG data: 34608 extraneous bytes before marker 0xda `blah.jpg' @ warning/jpeg.c/JPEGWarningHandler/346.
I've inherited a lot of JPEGs which have some extraneous information in them. Without recompressing the images, can ImageMagick strip these extraneous bytes without losing metadata?

User avatar
fmw42
Posts: 25124
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Corrupt JPEG data: 34608 extraneous bytes before marker

Post by fmw42 » 2013-08-26T13:54:03-07:00

If IM can read the jpgs, then it will decompress and recompress to make the output. You will likely need some other tool. see http://www.imagemagick.org/Usage/formats/#jpg_non-im

visitor x
Posts: 16
Joined: 2013-07-27T13:26:38-07:00
Authentication code: 6789

Re: Corrupt JPEG data: 34608 extraneous bytes before marker

Post by visitor x » 2013-08-28T02:06:32-07:00

Thanks, I used the command

Code: Select all

jpegtran -perfect -copy all -outfile fixed.jpg broken.jpg
from this page: http://blog.rubrik.me.uk/2013/08/fixing ... osslessly/

Post Reply