Monday, May 14, 2012

Modify EXIF info or metadata of a picture

SOmetimes the metadata / EXIF information contained in a picture taken from a camera are wrong. It creates problems when pictures from multiple cameras are made into a collage and uploaded into Piacsa. Picasa is unable to correctly sort images according to the time taken if images form of the cameras have shifted times. The following procedure shifts the time on a bunch of image files all begining with DSC.
Note : - Do no do a * in the or loop. It would shift the time on all the images.

TO see the EXIF info

exiv2 image.jpg

File name       : image.JPG
File size       : 3150838 Bytes
MIME type       : image/jpeg
Image size      : 2592 x 1944
Camera make     : SONY
Camera model    : DSC-HX5V
Image timestamp : 2012:04:29 17:11:21
Image number    :

-a : edits the date 

ad : performs the action

Now, the real code to shift time.

$ for image in DSC*; do exiv2 -a 15:00:00 ad  ${image}; done

No comments:

Print chess board in command line

The following bash one-liner will print a chess board in a terminal (the script works for the shells bash and ksh only) for (( i = 1; i ...