Removing metadata from RAW images

Started by mmx64, April 10, 2012, 12:23:54 PM

Previous topic - Next topic

mmx64

From the FAQ:

Quoteexiftool -all= dst.jpg

Delete all meta information from an image. Note: You should NOT do this to RAW images (except DNG) since proprietary RAW image formats often contain information in the makernotes that is necessary for converting the image.

The Make and Model tags are used by some image utilities (including ExifTool) to determine the format of the maker note information. Deleting or changing either of these tags may prevent these utilities from recognizing or properly interpreting the maker notes. Also beware that the maker notes information may be damaged if an image is edited when the maker notes are not properly recognized. So it is a good idea not to edit the Make and Model tags in the first place.

I discovered this when trying to open CR2 files in Photoshop after removing the metadata. How would one go about to remove as much metadata as possible from raw files, while still keeping these vital parts? I tried exiftool.exe -all= --makernotes orig.cr2 -o dest.cr2 but it still did not open in Photoshop. Is it possible?

Phil Harvey

For RAW files, you must be very careful when doing mass deletes, particularly since important information is stored in the maker notes.  However, I think this should be safe:

exiftool -xmp:all= -iptc:all= -gps:all= RAWFILE

Other tags should probably be deleted individually (ie. -artist= -copyright=).

However, information such as the camera serial number and owner name may still be left in the maker notes.

- Phil

P.S. Nice to see that someone reads the FAQ. :)
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

BogdanH

Hi,

Phil allready answered your question, but in case that wasn't what you needed to know:

I'm not sure if I understand what you're trying to do... so the question: why do you need/wish to remove (some of ) metadata? My impression is, you would like to "force" Photoshop to open your CR2 files -but I could be wrong, of course.
Adobe Camera Raw (ACR), which is part of Photoshop, is responsible to open CR2 files. So, if you can't open (not altered) CR2 files in Photoshop, then you probably need newer ACR plugin version -or in worst case, more recent Photoshop version.

Bogdan

Phil Harvey

One thing I just realized too.  Your command doesn't preserve the makernotes as intended for 2 reasons:

1) individual tags may not be excluded from a mass copy

2) the ExifIFD, which contains the makernotes, is being deleted

Instead, this may actually do what you want, but is dangerous, and I wouldn't recommend it:

exiftool -all= -tagsfromfile @ -makernotes orig.cr2 -o dest.cr2

This deletes the ExifIFD and MakerNotes, then copies back the MakerNotes from the original, creating an empty ExifIFD as necessary to contain the MakerNotes.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

mmx64