Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Digital Camera Picture Header

by pg (Canon)
on Jan 15, 2003 at 21:08 UTC ( #227229=perlquestion: print w/replies, xml ) Need Help??

pg has asked for the wisdom of the Perl Monks concerning the following question:

I bought a Kodak digital camera recently, but the editing software came with it has some bugs.

For example, one problem is that, whenever I crop a picture, the date on the picture is gone.

So I am thinking of do something myself. I am not interested in the "image", but I am really interested in the header info, which contains the date, etc.

Does any one know whether there is a Perl module for this? Or maybe you even tried one?

If not, maybe you can point me to some document, and I can do something from scrach. If I get the format, I can do whatever I want.

Replies are listed 'Best First'.
(ar0n) Re: Digital Camera Picture Header
by ar0n (Priest) on Jan 15, 2003 at 21:30 UTC
    Well, I suppose it all depends on what fileformat your picture is in. But there's Image::Info (direct link), which allows you to retrieve the Comment field of most standard image types, which is where I'd assume the date would be stored.
Re: Digital Camera Picture Header
by revdiablo (Prior) on Jan 15, 2003 at 23:28 UTC

    A lot of digital cameras store the metadata as EXIF. I could not find any CPAN modules mentioning EXIF, but there is a unix utility (called, quite originally, 'exif') which can read this data, and its output could easily be parsed.

    You can check it out at

    Update: as the previous poster mentioned, there's Image::Info, which actually does use EXIF for jpeg images.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://227229]
Approved by ar0n
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2021-12-02 17:07 GMT
Find Nodes?
    Voting Booth?
    R or B?

    Results (23 votes). Check out past polls.