Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Python

Need help dumping exif data in canon raw files

 

 

Python python RSS feed   Index | Next | Previous | View Threaded


nuffnough at gmail

Nov 5, 2009, 3:10 PM

Post #1 of 3 (51 views)
Permalink
Need help dumping exif data in canon raw files

So I've looked at all sorts of things, gone through as many different
things as I can find, but I fear python just can't do it.

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.

Ideally I'd be able to update the file with new exif info too, but
that would just be a bonus.

Right now I just want to open a file (say /home/nuffi/IMG_0001.CR2 or
d:\pic\IMG_0001.CR2) and print out all the exif info attached to the
file.

Is it impossible in Python?

TIA!

Nuffi
--
http://mail.python.org/mailman/listinfo/python-list


http://phr.cx at NOSPAM

Nov 5, 2009, 3:27 PM

Post #2 of 3 (46 views)
Permalink
Re: Need help dumping exif data in canon raw files [In reply to]

Nuff Nuff <nuffnough[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.
--
http://mail.python.org/mailman/listinfo/python-list


damienlmoore at gmail

Nov 6, 2009, 9:44 AM

Post #3 of 3 (32 views)
Permalink
Re: Need help dumping exif data in canon raw files [In reply to]

On Nov 5, 6:27 pm, Paul Rubin <http://phr...@NOSPAM.invalid> wrote:
> Nuff Nuff <nuffno...@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/
--
http://mail.python.org/mailman/listinfo/python-list

Python python RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.