Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
    
Are you looking for a commandline tool, or a GUI tool? –  JanC Aug 26 '10 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 '10 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 '10 at 15:44
    
Would this be better for superuser.com ? –  Chris Aug 26 '10 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 '11 at 10:11

5 Answers 5

up vote 4 down vote accepted

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?

share|improve this answer
    
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 '10 at 8:40
    
Exifprobe works wonderfully. Thanks a lot. –  ddeimeke Aug 27 '10 at 4:15

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.

share|improve this answer

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.

share|improve this answer

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.

share|improve this answer
    
Thanks, but I am pretty bad in Python. –  ddeimeke Aug 26 '10 at 11:36

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.

share|improve this answer
    
Oh, if that works, it would be great. –  ddeimeke Aug 26 '10 at 11:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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