Rotate image if needed, then strip exif metadata
Posted: 2016-04-16T14:54:15-07:00
I have a collection of photos that I want into thumbnails with the size of 600x400. These are the rules
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?
- 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)
Code: Select all
convert "$img" -resize 600x400 -background black -gravity center -extent 600x400 "$dest.jpg"
How do I tell imagemagick to rotate all the vertical images and then strip all the metadata?