Menu

#30 jpegtran \"Corrupt JPEG data: premature end of data segment\"

closed-fixed
nobody
5
2014-03-27
2011-07-15
No

I have jpegtran from libjpeg-turbo version 1.1.0 (build 20110322).

I use jpegtran to rotate pictures (jpegtran -rot 90 -outfile foo.rot.jpg foo.JPG). I can do this without errors with pictures from different cameras (mostly Canons), but I get the error with most (but not all) pictures from one new camera: Panasonic, DMC-ZS6. The error is as in the title: \"Corrupt JPEG data: premature end of data segment\". The error probably returns non-zero because the program that uses it (in my case jhead) aborts after the error (it doesn\'t complete the batch job). The error is reproducible directly with jpegtran as in the command above (without jhead). Oddly, however, the output file is correctly rotated and rendered by at least Firefox. I\'m not an expert so I don\'t know if the file is missing anything. But whatever the error, it\'s late in the pipeline since the correct image has already been made.

These links point to sample images, the first one causes the error (a typical example):
http://viiia.org/__fotos/2011-05_Ptn/new/tmp/P1010060.JPG
The second one is one of the oddballs from the same camera that doesn't cause the error:
http://viiia.org/__fotos/2011-05_Ptn/new/tmp/P1010072.JPG

If this is a libjpeg error, please fix obviously, although if the files are corrupt in your opinion, I'd love to know as well (but seriously, 98% of the pics from that Panasonic camera produce the error, from pictures taken since it was bought through a whole month).

Discussion

  • DRC

    DRC - 2011-07-15

    Should already be fixed in 1.1.1

     
  • Alejandro Ochoa

    Alejandro Ochoa - 2011-07-23

    You're right, version 1.1.1 fixed it for me.

    Sorry about the delay, update had to trickle to Fedora's main repository and then I had to find time to test this on all offending files...

     
  • DRC

    DRC - 2014-03-27
    • status: closed --> closed-fixed
     
MongoDB Logo MongoDB