Author Topic: delete all exif data, but retain image orientation?  (Read 3011 times)

inte

  • Jr. Member
  • **
  • Posts: 15
delete all exif data, but retain image orientation?
« on: April 04, 2014, 12:55:26 PM »
This command line: exiftool -all= -copyright="Photo"= did the job, but any images shot portrait orientation are now landscape.

Is there a way to delete all metadata except whatever is necessary to retain the orientation of the images?

inte

  • Jr. Member
  • **
  • Posts: 15
Re: delete all exif data, but retain image orientation?
« Reply #1 on: April 04, 2014, 01:13:37 PM »
Nikon D3s JPG files...

inte

  • Jr. Member
  • **
  • Posts: 15
Re: delete all exif data, but retain image orientation?
« Reply #2 on: April 04, 2014, 01:15:54 PM »
Tried adding

-orientation='(normal)'
-cameraorientation='(normal)'

No errors returned but tags have no effect - all images are set to landscape (horizontal) after running the command.

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3803
Re: delete all exif data, but retain image orientation?
« Reply #3 on: April 04, 2014, 07:05:47 PM »
You command would look like:

exiftool -all= -tagsfromfile @ -Orientation FILE

This removes all data, then adds the orientation setting back in. 

For any portrait orientated files that you've already deleted the data from, you'll have to run either
ExifTool -Orientation="Rotate 90 CW" FILE
or
ExifTool -Orientation="Rotate 270 CW" FILE
depending upon the file, to rotate them back to the normal position.
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

inte

  • Jr. Member
  • **
  • Posts: 15
Re: delete all exif data, but retain image orientation?
« Reply #4 on: April 04, 2014, 09:33:34 PM »
Perfect!