Need help dumping exif data in canon raw files

dmoore damienlmoore at gmail.com
Fri Nov 6 12:44:49 EST 2009


On Nov 5, 6:27 pm, Paul Rubin <http://phr...@NOSPAM.invalid> wrote:
> Nuff Nuff <nuffno... at gmail.com> writes:
> > I just need to be able to extract the exif info from a canon CR2
> > file.  The info from canon suggest that it's just the same as a tiff,
> > but anytime I try to get PIL to open one,  it says that it tastes
> > bad.  And canon don't seem to be all that forthcoming on the details.
>
>CR2 is a hardware-specific raw format and PIL should not be expected
>to understand it.  Try a websearch for dcraw.c to find a decoder for it.

also check out pyexiv2 (a python binding of exiv2), available in many
linux distros:

http://tilloy.net/dev/pyexiv2/index.htm

the current version of pyexiv2 doesn't yet support XMP metadata (the
underlying exiv2 lib does) but should be able to read Exif and IPTC
data ok. Looking at http://dev.exiv2.org/wiki/exiv2/Supported_image_formats
you may be SOL for writing to CR2. You can also try calling exiftool
from your python script: http://www.sno.phy.queensu.ca/~phil/exiftool/



More information about the Python-list mailing list