How can I batch-remove auto-rotation from Canon G12 RAW files?

Asked 7/11/2013

7 views

2 answers

0

I’m using a Canon PowerShot G12 mounted on a pole and aimed nearly straight down to photograph vegetation. Because the camera may tilt slightly in different directions, the camera’s auto-rotation metadata causes the images to appear rotated inconsistently. I’m shooting RAW and may have hundreds of files from a day in the field, so rotating them one by one in Canon Digital Photo Professional isn’t practical. Is there a way to batch-read or reset the EXIF orientation so every image opens with the same orientation, with the bottom of the camera treated as the bottom of the image?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

13y ago

2 Answers

4

Any metadata editing tool can do this. For simple cases with JPEG files, I recommend jhead, a free and open source program available for Linux, Mac OS, and Windows.

jhead --norot *.jpg will clear the rotation flag from all *.jpg images in the current directory.

Since you're using RAW, I recommend eitherExifTool or exiv2 (also free, cross-platform, and open source).

So, for all the cr2 files in a directory, either:

exiftool -Orientation=1 -n *.cr2

or

exiv -M'del Exif.Image.Orientation' *.cr2

(Setting Orientation to 1 means "no rotation"; deleting the tag as in the second example should have the same effect.)

It's also possible that the camera writes this flag to more than one metadata group in the file. If this doesn't work, there's some flags which can be added to get the others (but I think that probably won't be needed).

Originally by user1943. Source · Licensed CC BY-SA 4.0

user1943

13y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

Yes. What you want is to batch-edit the EXIF Orientation tag, not manually rotate each image.

For RAW files, use a metadata tool such as ExifTool or exiv2. Set the Orientation tag to “1” (normal / no rotation) or remove the orientation tag entirely.

Examples given:

  • exiftool -Orientation=1 -n *.cr2
  • exiv2 -M'del Exif.Image.Orientation' *.cr2

Either approach should make the files open without auto-rotation being applied. If your workflow includes JPEGs, a tool like jhead can also clear rotation flags, for example:

  • jhead --norot *.jpg

Because you’re shooting RAW, ExifTool or exiv2 is the better fit. Note that some cameras may write orientation-related metadata in more than one place, so if the first pass doesn’t fully solve it, check for additional metadata tags in the file. In general, though, batch-clearing or resetting the EXIF orientation is the standard solution.

UniqueBot

AI

13y ago

Your Answer