Tuesday, July 27, 2010

Save JPEG images in Photoshop without losing EXIF tags

If you open any JPEG (or RAW) images straight from your DSLR in OEM provided software (like Canon Digital Photo Professional or Nikon ViewNX etc.) and look at image information (EXIF data)  you will notice that your camera stores a lot more information about the image than you can imagine.

They store most of that extra information under makernotes section. This data includes information about lens, its focal point, auto focus point used, metering information etc.

However if you open that image in any version on Adobe Photoshop and save it, you will lose all that data. Since the makernotes section is a binary format, and since Adobe does not understand the binary format used by all camera manufactures, it does NOT write that section while saving the file. If you are like me, who likes to catalog their images, and want to search images shot by specific lens etc, you will lose important piece of data. 

But there are other tools like Phil's Exiftool which can understand and copy/save this section. And I have to agree that Photoshop does what it is designed for which is to edit images. So I thought if I can somehow force Exiftool to copy exif data from original image to image saved by Photoshop I can have best of both world. So I wrote a Photoshop script to do exactly that.

This Script would provide below options:
1. Save opened image retaining the images makernotes section.
2. Save the image as a copy and copy the makernotes from source image
3. Save the image with all EXIF tags copied over from a different image. useful for HDR's.
4. Save the image as a copy with all EXIF tags copied over from a different image.


Since Photoshop does not have any events for SaveAs action I had to add my script through a separate menu option, and can be accessed by File->Script->Save with Exif.

Please download the script from my Google site, and Exif Tool from here, and place both of them at
<Photoshop install location>/presets/scripts folder (e.g. C:\Program Files\Adobe\Adobe Photoshop CS4\Presets\Scripts)

Please try and let me know if you face any issues, or have any feature requests or any feedback in general.

Note: You need to download Windows Executable or Mac OS X Package of Exiftool.
The script is in plain text, so it can be edited whatever way you want.

1 comment:

  1. Hi! I found this after a laborious search in Google. You save my life! Thank you!!! You are the guy!

    ReplyDelete