I'm trying to resize an uploaded image then add a watermark. My watermark is a transparent 24bit PNG that was created in Photoshop. The problem is when ImageMagick loads the watermark, it's rotated 90 degrees counter-clockwise. I can't figure out how to stop the PNG from rotating.
Code: Select all
convert uploadFile.jpg -resize "980x700^>" -quality 70 watermark.png -gravity southeast -geometry +30 -composite newFile.jpg
EDIT: I figured out the problem. I had a hunch to try with some different base photos and that was the problem. The images I was testing with were from an iPhone and it had rotation EXIF data. I still don't understand why ImageMagick would behave this way, but I guess it must have overlayed the composite image based on the base image's EXIF data? Why would it do that?
I changed the command to this and it worked, but I still don't understand why ImageMagick would rotate the composited image based on the base image's EXIF data. (notice the
-auto-orient)
Code: Select all
convert uploadFile.jpg -resize "980x700^>" -auto-orient -quality 70 watermark.png -gravity southeast -geometry +30 -composite newFile.jpg