Page 1 of 1

Rotate image if needed, then strip exif metadata

Posted: 2016-04-16T14:54:15-07:00
by coloring
I have a collection of photos that I want into thumbnails with the size of 600x400. These are the rules
  • images that are not in 6:4 format must be letterboxed, not stretched
  • vertical images must have lateral letterboxing
  • no exif metadata should be left on the thumbnails (size reasons)
I almost of solved my problem with

Code: Select all

convert "$img" -resize 600x400 -background black -gravity center -extent 600x400 "$dest.jpg"
I now need to strip the exif metadata. But if I do that adding -strip, vertical images will not be displayed correctly any more. I also tried to use -auto-orient -strip, but it does not rotate the images.

How do I tell imagemagick to rotate all the vertical images and then strip all the metadata?

Re: Rotate image if needed, then strip exif metadata

Posted: 2016-04-16T14:57:40-07:00
by snibgo
Last time I tried it, "-auto-orient" worked fine. Please post an example where it doesn't.

EDIT: and, of course, tell us which version of IM you are using.