Using ImageMagick To Fix Upside Down Digital Pictures
I recently took some pictures with my phone, and when I went to upload them to a web service they were upside down for some reason. It turns out that the orientation of an image is stored in the exif data of a photo.
- To start I made a directory for the fixed images:
- To fix this, I stripped the exif data:
mogrify -strip -path ~/fixed images/*.jpg
- Then flipped the images
mogrify -flip -flop ~/fixed/*.jpg