5

I am searching for a tool, that extracts meta data out of raw images produced by a digital SLR (in my case Canon EOS 550D).

The photos can be converted by a recent version of ufraw (here is the PPA for that).

With my compact camera I simply use exif, which only works on jpg and does not work with raw images.

Any hints?

6
  • Are you looking for a commandline tool, or a GUI tool?
    – JanC
    Aug 26, 2010 at 8:09
  • It has to be a command-line tool. I want to use the output to rename the files by date.
    – ddeimeke
    Aug 26, 2010 at 8:43
  • Please edit your question to include the information you posted in your comment about needing a command line tool.
    – moberley
    Aug 26, 2010 at 15:44
  • Would this be better for superuser.com ?
    – Chris
    Aug 26, 2010 at 18:28
  • 1
    ufraw on the command line has an --exif switch which tells it to copy the exif data from your raw file the output file
    – HorusKol
    Jun 29, 2011 at 10:11

5 Answers 5

5

From the description of the package exifprobe:

Exifprobe reads image files produced by digital cameras (including several so-called "raw" file formats) and reports the structure of the files and the auxiliary data and metadata contained within them. In addition to TIFF, JPEG, and EXIF, the program understands several formats which may contain "raw" camera data, including MRW, CIFF/CRW, JP2/JPEG2000, RAF, and X3F, as well as most most TIFF-derived "raw" formats, including DNG, ORF, CR2, NEF, K25/KDC/DCR, and PEF.

http://www.virtual-cafe.com/~dhh/tools.d/exifprobe.d/exifprobe.html

Does that work?

2
  • I will give it a try. Since my camera model does not seem to be support, I will have to check it at home. Thanks!
    – ddeimeke
    Aug 26, 2010 at 8:40
  • The virtual-cafe link is dead, but I found a fork on github that is working on macOS, assume it works on ubuntu: github.com/hfiguiere/exifprobe
    – eskimwier
    Feb 12, 2018 at 23:13
2

I would use exiv2 tool this is the same library as ufraw/darktable uses for accessing exif data in raw images.. http://www.exiv2.org/ which also does support some MakerNotes from manufactors such as Nikon/Canon. With exiv2 it also possible to look at some advanced technical data about image. For example

exiv2 -P nxytv your_raw_file

will output all tags as tag hex code tag name tag data type tag plain data tag interpreted data

which contains, for example, ColorMatrix and CameraCalibration values.

1

From your comment I get it that what you ultimately want to do is renaming the file based on the date. If that's the only reason why you want to use a commandline tool instead of a GUI, you could try phatch (in the repositories) instead of doing the EXIF extraction/file renaming yourself.

Phatch allows to batch process images (i.e. perform a set of actions on every image in a folder for example). One of the possible actions is rename and you can use Variables like <Exif_Image_DateTime> to rename it based on the EXIF data. Once you defined and saved your list of actions, you can also use phatch from the commandline.

0

If I were you, I'd consider writing a little Python script to do this, pulling in pyexiv2. It's extremely easy to use:

>>> metadata = pyexiv2.ImageMetadata('test.jpg')
>>> metadata.read()
>>> metadata.exif_keys
['Exif.Image.ImageDescription',
 'Exif.Image.XResolution',
 'Exif.Image.YResolution',
 'Exif.Image.ResolutionUnit',
 'Exif.Image.Software',
 'Exif.Image.DateTime',
 'Exif.Image.Artist',
 'Exif.Image.Copyright',
 'Exif.Image.ExifTag',
 'Exif.Photo.Flash',
 'Exif.Photo.PixelXDimension',
 'Exif.Photo.PixelYDimension']
>>> metadata['Exif.Image.DateTime'].value
datetime.datetime(2004, 7, 13, 21, 23, 44)

Note: Different cameras use different fields for dates. Check first to see what keys are available.

It should support raw images. I know it does for the NEF raw files my Nikon creates.

If it doesn't, do you have JPEG versions too with similar names (ie different extensions)? Even if it can parse your RAW files, it might be worth ticking through the JPEGs for its EXIF data because it'll likely be a bit faster.

Tip: You can use the Python shell instead of having to write a "proper" Python script. This is good for testing things out but if you want something you can use over and over again, you probably want to write a script.

1
  • Thanks, but I am pretty bad in Python.
    – ddeimeke
    Aug 26, 2010 at 11:36
0

My favorite answer for fussing with EXIF data is exiftool. It's portable, free, open, written in Perl, and can be used as a Perl module for those so inclined.

It even works on Windows.

1
  • Oh, if that works, it would be great.
    – ddeimeke
    Aug 26, 2010 at 11:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.