There is a very flexible and easy Linux tool that helps you change the EXIF meta-data of images. It allows you to change individual files or whole bunch of them with one command. You can also put different rules about what files and how you want to change them if you need to.
The program is called exiftool. So let’s install it first.
In terminal execute:
sudo apt-get install libimage-exiftool-perl
Now you are ready to start changing the meta-data of the images.
For example, if I wanted to change all the dates and times (DateTimeOriginal, CreateDate and ModifyDate) of the IMG_01.jpg file to the 8th of August 2010 at 3:35:33 PM I would do:
exiftool -AllDates='2010:08:08 15:35:33' -overwrite_original IMG_01.jpg
If I wanted to change the dates on all the files in the “images” directory, I would do:
exiftool -AllDates='2010:08:08 15:35:33' -overwrite_original images
The “-overwrite_original” option is necessary if you want to change the meta-data of the original images. If you omit that option, then exiftool will back-up the originals by making a copy of them and adding “_original” to the end of the file names.
If you want to change the dates to all the files in the “images” directory that were taken by a Cannon camera (and not touch the rest) I would do:
exiftool -AllDates='2010:08:08 15:35:33' -if '$make eq "Canon"' -overwrite_original images
As far as changing dates and times, there is another option of exiftool that lets you do time calculation.
For example, the other day I found out that my camera’s time was correct but the date was ahead by 30 days. That meant that all the photos I had taken lately had dates that were off by exactly 30 days. If I were to use the above examples I could set the dates individually (which would be a long and tedious process) or set all the images to the same date and time (which would be wrong). In this case I used the date calculating option and just executed:
exiftool -AllDates-=720:00 -overwrite_original images
That command subtracts 720 hours (30 days) off the dates of each image file in the images directory. Now every image has the exact date and time it was taken.
I have only scratched the surface of what this tool is capable of. For more information look at the man pages of the exiftool command.
2 Comments to Change the date and time (or any other EXIF image meta-data) of pictures with Ubuntu
Leave a comment
- Olivier on Dynamic Port Forwarding with SOCKS over SSH
- Ld7 on How to connect your Android phone to Ubuntu to do development, testing, installations or tethering
- get more Info on How to get Picasa images using the Image Picker on Android devices running any OS version
- Casper on How to detect a user pan/touch/drag on Android Map v2
- Install SSH as socks proxy for dynamic port forwarding | Steve Constine on Dynamic Port Forwarding with SOCKS over SSH
- April 2013 (1)
- November 2012 (2)
- August 2012 (1)
- May 2012 (1)
- March 2012 (1)
- November 2011 (1)
- August 2011 (1)
- April 2011 (1)
- January 2011 (2)
- September 2010 (1)
- August 2010 (2)
- July 2010 (2)
- June 2010 (2)
- May 2010 (1)
- January 2010 (2)
- December 2009 (2)
- November 2009 (3)
- October 2009 (1)
- September 2009 (3)
- July 2009 (1)
- May 2009 (1)
- March 2009 (1)
- February 2009 (2)
- January 2009 (2)
- December 2008 (1)
- November 2008 (4)
- October 2008 (5)