How to retrieve date/time information from JPG file?

W

Wenwei Weng

hello,

I bought a Canon Powershot A80 digital camera. Sadly, I found out that date
is not shown on the image. Only if I buy Canaon photo printer, the date can
be printed on the photo. I believe it is Canon's dirty marketing strategy.

So I decide to write a program to put the date on the image. I have almost
completed: it take the image file name, and the date to be put on. It works
fine. But my friend told me that the date actually can be retrieved from JPG
image file itself, it is part of image property.

Wondering anyone has done this. Any help will be appreciated.

Thanks in advance.
Wenwei
 
R

Roedy Green

So I decide to write a program to put the date on the image. I have almost
completed: it take the image file name, and the date to be put on. It works
fine. But my friend told me that the date actually can be retrieved from JPG
image file itself, it is part of image property.

t may be potentially in there, but it looks like the Canon camera has
no clock, so don't hold your breath. A clock need to be resynched. If
it is there, it should be obvious.
 
W

Wenwei Weng

The Camera manual explicitly says that "even you turn on date/time, it
doesn't mean date/time will be shown on the image. But if you want to print
the image, date/time can be printed. See Software Guide..."
 
V

VisionSet

Wenwei Weng said:
hello,

I bought a Canon Powershot A80 digital camera. Sadly, I found out that date
is not shown on the image. Only if I buy Canaon photo printer, the date can
be printed on the photo. I believe it is Canon's dirty marketing strategy.

So I decide to write a program to put the date on the image. I have almost
completed: it take the image file name, and the date to be put on. It works
fine. But my friend told me that the date actually can be retrieved from JPG
image file itself, it is part of image property.

Wondering anyone has done this. Any help will be appreciated.

I think this will do that if it is in there, and I think it usually is.
My own Canon Ixus400 images provide a host of fields to photoshop including
date.

javax.imageio.metadata
 
R

Roedy Green

The Camera manual explicitly says that "even you turn on date/time, it
doesn't mean date/time will be shown on the image. But if you want to print
the image, date/time can be printed. See Software Guide..."

IT could mean the printer adds the print date, or it could mean the
date is encoded in the image, just not normally viewable. If the
second, you are in luck.

Try opening the image in various paint program to see if any know the
date.
 
M

Michael Borgwardt

Wenwei said:
So I decide to write a program to put the date on the image. I have almost
completed: it take the image file name, and the date to be put on. It works
fine. But my friend told me that the date actually can be retrieved from JPG
image file itself, it is part of image property.

Here's a program that displays the various EXIF metadata fields,
complete with Java source code: http://www.instituteofthefuture.org/exifomatic/
 
N

Nigel Wade

hello,

I bought a Canon Powershot A80 digital camera. Sadly, I found out that
date is not shown on the image. Only if I buy Canaon photo printer, the
date can be printed on the photo. I believe it is Canon's dirty
marketing strategy.

There's no conspiracy. Many picture editing packages access this
information. Some will allow you to add it to the picture, or make it into
a watermark.

So I decide to write a program to put the date on the image. I have
almost completed: it take the image file name, and the date to be put
on. It works fine. But my friend told me that the date actually can be
retrieved from JPG image file itself, it is part of image property.

He is right. It's part of the Exif meta-information stored with the image.
It typically includes exposure settings (aperture, focal length, shutter
speed) as well as date/time, and other things I can't remember offhand.

Wondering anyone has done this. Any help will be appreciated.

JAlbum has already done it all. If you want to create very nice albums,
Web sites, thumbnails etc., JAlbum is the best place I know to start. URL
is http://www.jalbum.net (and it's free). No source though, but it does
have a documented API (to bring it on topic - not that I've tried it).
 
M

Marcel

What you're looking for (if you're still looking for it) can be found
at

http://www.drewnoakes.com/code/exif/

Not only can the time be read, but also tons of other stuff (did the
flash fire? What was the shutter speed? Were any comments added? What
kind (make and model) of camera took the picutre? etcetcetc).

This is also the library used by the PicL tool
(http://picl.sourceforge.net), used to move your files around based on
metadata. A new release is planned soon, by the way...

Good luck!
Marcel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,479
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top