Comment 5 for bug 1842116

Revision history for this message
Akkana Peck (akkzilla) wrote :

Still a problem in 20.04.

I'm not using -perfect. A way to reproduce this is to start with a JPG image from a camera, then scale it down using GraphicsMagick (this happens starting with JPGs from either a Sony or Canon camera). Like this:

$ convert dsc00902.jpg -scale 1024 dsc00902sm.jpg

$ jhead dsc00902*.jpg | grep Orientation
Orientation : rotate 90
Orientation : rotate 90

$ exifautotran dsc00902*.jpg
Executing: jpegtran -copy all -rotate 90 dsc00902.jpg

$ jhead dsc00902*.jpg | grep Orientation
Orientation : rotate 90

$ jhead dsc00902*.jpg | egrep '(File name|Orientation)'
File name : dsc00902.jpg
File name : dsc00902sm.jpg
Orientation : rotate 90

$ jhead -autorot dsc00902sm.jpg
Modified: dsc00902sm.jpg

$ jhead dsc00902*.jpg | egrep '(File name|Orientation)'
File name : dsc00902.jpg
File name : dsc00902sm.jpg

So after exifautotran dsc00902*.jpg, the original full-sized Sony JPEG was rotated, but not the smaller version I'd created using convert -scale from GraphicsMagick: it just silently failed.
But jhead -autorot was able to successfully rotate the scaled image.

Is there a better workaround than jhead -autorot until exifautotran/jpegexiforient get fixed?