May 9, 2010

Exif?!

Did you ever examine what data your digital camera is writing inside your images? There is much more than the picture itself. It is called
EXIF = Exchangeable Image File Format
Here a shortened listing:
ExifTool Version Number : 7.30
File Name : 2OG.JPG
File Size : 831 kB
File Modification Date/Time : 2008:05:19 13:49:28
File Type : JPEG
MIME Type : image/jpeg
Exif Byte Order : Little-endian (Intel, II)
Make : NIKON
Camera Model Name : COOLPIX S6
Orientation : Horizontal (normal)
Software : COOLPIX S6V1.0
Modify Date : 2008:05:19 13:49:28
Y Cb Cr Positioning : Co-sited
Exposure Time : 1/125
F Number : 8.5
Exposure Program : Program AE
ISO : 50
Exif Version : 0220
Date/Time Original : 2008:05:19 13:49:28
Create Date : 2008:05:19 13:49:28
Max Aperture Value : 3.0
Flash : Off
Focal Length : 5.8 mm
Maker Note Version : 2.00
Color Mode : Color
White Balance : Auto
Focus Mode : AF-S
ISO Selection : Auto
Data Dump : (Binary data 1502 bytes, use -b option to extract)
Compression : JPEG (old-style)
Preview Image Start : 14921
Preview Image Length : 16048

Until this weekend i did not care about this information, too. But After upgrading my laptop all images loosed the right date, because with a wrong copy command the date was replaced with the current date. But with the help of exiftool (apt-get install libimage-exiftool-perl) it was easy to correct the wrong date:
$ exiftool 2OG.JPG |grep "Create Date"
Create Date : 2008:05:19 13:49:21
Using exiftool together with awk, sed and touch the date of the images can be restored without a problem...

1 comment:

  1. No need to use awk, sed and touch: exiftool "-filemodifydate<datetimeoriginal" FILE

    ReplyDelete