1 Attachment(s)
[RESOLVED] JPEG's create time detection
I need to find the creation time of a JPEG file (additionally other image file formats, too).
For instance, IrfanView application offers this information in Images -> Information menu.
http://www.codeguru.com/forum/attach...1&d=1285526629
I'm looking for a simply detection way (without extern commercial library or a very complex library).
I was thinking to start from JPEG file header, but as I can see from here, the information that I'm looking for it doesn't appear in header.
Re: JPEG's create time detection
Your image shows the file date/time. This has nothing to do with the fact that it is a image, but simply with the fact that it is a file.
Re: JPEG's create time detection
My image is window Information screenshot from IrfanView application.
I think that the information that I'm looking for is contained by Exchangeable image file format (Exif).
Somebody recommended me Exiv2 C++ library.
Any right recommandations are appreciated.
Re: JPEG's create time detection
Quote:
Originally Posted by
Maximus_X
My image is window I
nformation screenshot from IrfanView application.
I think that the information that I'm looking for is contained by
Exchangeable image file format (Exif).
Somebody recommended me
Exiv2 C++ library.
Any right recommandations are appreciated.
Right, and Skizmo was referring to the fact that this data can easily be read off of the disk (no need to obtain it from the file internals). In other words, this is a property of the file not a property of the file type (and what it may or may not contain).
Viggy
Re: JPEG's create time detection
Maybe I was not so clear. I am looking for the date when a picture was created in the camera, not as a any other file property on a disk.
I need that internal metadata instead of WIN32_FIND_DATA and stuff. ;)
That's why I think that I need simply library that works with Exchangeable image file format (Exif).
Re: JPEG's create time detection
If you want file creation time, then follow what other people above said.
If you want date of picture taken, then this is stored in EXIF and your best bet is to use a library to parse EXIF for you.
Re: JPEG's create time detection
I thought that it was clear from the beginning that I was taking about the data that a camera writes in a file not about normal files properties.
The attachment was special introduced in order to avoid any confusion.
Meantime a found a simple and useful class CExif. Thank you.
Re: JPEG's create time detection
Quote:
Originally Posted by
Maximus_X
I thought that it was clear from the beginning that I was taking about the data that a camera writes in a file not about normal files properties.
The attachment was special introduced in order to avoid any confusion.
Meantime a found a simple and useful class
CExif. Thank you.
Sorry, but that screenshot just confused more than it solved. That screenshot is showing the file-date on the filesystem, not the date when the picture was taken. If you want the date when the picture was taken you should have clicked the "Exif..." button on your screenshot and attached that screenshot.
Re: [RESOLVED] JPEG's create time detection
Sorry guys for this confusion. In the moment when I posted this attachment I didn't know about Exif.
I was wrong because that date was the date and time of the event when the picture was created and I took it right.
I copied the pictures from SSD only after two days. Maybe my Irfanview app or camera has a bug.
Indeed, exinf button shows the right data.