Showing posts with label cr2. Show all posts
Showing posts with label cr2. Show all posts

Friday, May 10, 2013

How do I extract an embedded JPEG from a RAW file?

Short answer:


exiftool -b -JpgFromRaw IMG0001.NEF > test.jpg

Long answer:

Most RAW files contain not only the raw data that was captured when the picture was taken, but also a jpeg file which can be used to quickly show the image before the RAW has been completely interpreted.

Some programs that pretend to handle RAW files actually just extract the jpeg and displays that one to the user.

There is rarely any reason to extract the jpeg manually, but if you want to, you can use the command tool above using exiftool which is a tool available for Windows, Mac OS and Unix/Linux.

Just replace "IMG0001.NEF" with the name of your RAW file and "test.jpg" with the name of the jpeg you want to create.

Update: The name of the preview is not the same for all RAW files. That's why Jener in the comment section succeeds with PreviewImage but not with JpgFromRaw. In general, if you have problems with the command, try the exiftool documentation page

Sunday, June 20, 2010

Updating metadata in a CR2 file

To find images quickly using a disk search tool, like Mac OS X' Spotlight, you can update the metadata of the images. You can for example set the description to "Holiday in Sverdlovsk". Searching for that string in Spotlight will quickly show you all the images.

For JPEG files, you can use for example Adobe Bridge to quickly do this. I assume Lightroom also works.

However, when it comes to RAW files, like NEF and CR2, Bridge adds the metadata in a separate xmp file. When you search for the string using Spotlight, you will find the xmp files but there will be no preview of the image in the search result.

Bridge itself finds the data of course, but you may have moved the files to a computer without Bridge installed.

To update the Description field you can use View NX (free) or Capture NX for Nikon's NEF files. For Canon's CR2 files, however, it seems like it is not that easy.

One solution is to use Aperture.
  1. Open the file in Aperture.
  2. Click on Metadata and choose the "General" set.
  3. Update the field "Caption". That is the field that other applications usually call "Description".
  4. Go to File > Export > Master...
  5. Enter the data as you want, but make sure the option Include IPTC is set.
  6. Save.
You can of course export several images at the same time, and even mix different formats.

There are other solutions than Aperture, I am sure. It should for example be possible to use the utility exiftool which is free. However, Aperture is the most convenient solution I found so far.