Page 1 of 1

"auto-orient" + "flatten"

Posted: 2015-12-03T03:42:11-07:00
by doublemax
Testcase (result should be 'landscape'):

Code: Select all

wget https://raw.githubusercontent.com/recurser/exif-orientation-examples/master/Landscape_5.jpg
/usr/local/bin/convert -auto-orient "Landscape_5.jpg" -flatten "result.png"
Other examples from this list work fine.
ImageMagick 6.9.2-7

Thanks!

Re: "auto-orient" + "flatten"

Posted: 2015-12-03T03:58:56-07:00
by Bonzo
Are the good images and bad images from the same camera etc. Different cameras can write different data to the image or none at all.

Have you checked the image data with -identify -verbose?

What happens without the -flatten?

Re: "auto-orient" + "flatten"

Posted: 2015-12-03T10:17:06-07:00
by fmw42
try putting -auto-orient after the input image.

Re: "auto-orient" + "flatten"

Posted: 2015-12-03T10:45:11-07:00
by doublemax
Same, orientation-flag-example is wrong:

Code: Select all

wget https://raw.githubusercontent.com/recurser/exif-orientation-examples/master/Landscape_5.jpg
/usr/local/bin/convert "Landscape_5.jpg" -auto-orient -flatten "result.png"
From this list all the images work but the "5s" and the "7s":
https://github.com/recurser/exif-orientation-examples

Thanks a lot

Re: "auto-orient" + "flatten"

Posted: 2015-12-03T13:31:43-07:00
by dlemstra
Why do you need the -flatten? It works perfectly without that extra unnecessary option.

Re: "auto-orient" + "flatten"

Posted: 2015-12-03T14:26:59-07:00
by doublemax
Input images are user-uploaded image files.
They can have layers - and I want a generic commandline (any uploaded image should become a PNG/JPG image)

Re: "auto-orient" + "flatten"

Posted: 2015-12-03T14:33:19-07:00
by dlemstra
Adding +repage after -auto-orient seems to resolve the issue.

Re: "auto-orient" + "flatten"

Posted: 2015-12-03T14:55:57-07:00
by doublemax
You are right - sorry for disturbing.