I wanted to use convert to modify just the exif orientation tag of a jpg file:
convert original.jpg -set Exif:Orientation 1 new.jpg
I expected new.jpg to differ from orignal.jpg only in a few bytes. But actually the new file is 10k smaller than the original and its color statistics have changed slightly. This happens even if I don't specify any operation at all:
convert original.jpg new.jpg
Here I would expect new.jpg to be identical to original.jpg except possibly for some modification date but certainly there shouldn't be any difference in the image data, right? I can keep running convert (or mogrify) without operation on the new file and it will keep producing new files that all have different statistics (but look equal to the human eye).
You may have more luck with jhead
, available from here.
It has two options that might be useful to you:
-autorot Set rotation automatically
-norot Clear rotation flag (maybe add `-rgt` to regenerate thumbnail)
Alternatively, you may get on better with exiftool
, available here .
Use it like this:
exiftool -Orientation=1 -n SomeImage.jpg