Auto orient and remove other exifs

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
seban
Posts: 1
Joined: 2015-01-12T06:51:23-07:00
Authentication code: 6789

Auto orient and remove other exifs

Post by seban »

Hi,
I am trying to auto orient image and remove unnecessary exif informations. Basically I just want to leave "Orientation".
I am calling

Code: Select all

mogrify -auto-orient -strip image.jpg
But this clears all exif data. My question is: is there any option to remove all exif data except "Orientation"?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Auto orient and remove other exifs

Post by snibgo »

What is the point of keeping "Orientation" after you have auto-oriented it?

For exif processing, such as removing some exif data but keeping other, exiftool is usually more capable than IM.
snibgo's IM pages: im.snibgo.com
davidhartman00
Posts: 1
Joined: 2019-07-16T12:12:50-07:00
Authentication code: 1152

Re: Auto orient and remove other exifs

Post by davidhartman00 »

You can try using

Code: Select all

+profile EXIF
to remove just the EXIF data. Or the reverse would be to save the EXIF data and remove everything else. They give an example of this here: https://imagemagick.org/script/command- ... hp#profile
Post Reply