A chronological documentation test project, nothing serious, really!

22 Nov 2007 Number of shots taken by Nikon D80 camera

The Nikon D80 camera contains a EXIF tag value that counts the number shots taken

Tag (hex) Tag (dec) IFD Key Type Tag description
0x00a7 167 Makernote Exif.Nikon3.ShutterCount Long Number of shots taken by camera

This can be extracted by running the following command

exiv2 -pt picturename.JPG
Exif.Nikon3.ShutterCount                     Long        1  5263

This example shows that there have been 5263 shots taken.

I guess this EXIF tag exists on Nikon D40x, D60 and D70 also, but this is not verified.

More Nikon specific EXIF tags can be found on

Tags: , , , ,

Posted by

18 Nov 2007 Strip EXIF tags from JPG files

Sometimes it’s a good idea to remove the hidden data a JPG file contains, like when you publish picures on the Internet.
An easy way to remove all EXIF-tags from your JPG files is to run the command using jhead

jhead -purejpg *.jpg

Tags: , ,

Posted by

28 May 2007 A EXIF dater script

The script below will take a filename eg: DSCN0001.JPG, extract the “Image Created” metadata and rename the original file to something like 2006-03-23_DSCN00001.JPG and it will do it automatically for you.

#! /bin/shfunction usage() {if [ $# -ne 1 ]; then    echo "ExifDater - version 0.1 - March 23 2006"    echo "El-Lotso ”    echo “This  is  free  software;  see the source for copying conditions.”    echo “There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR”    echo “A PARTICULAR PURPOSE.”    echo    echo “ExifDater utilises the exiftags(”    echo “program to sequentially extract the image creation date from”    echo “JPEG EXIF headers.”    echo    echo “Usage:”    echo “$0 /path/to/jpg/directory”    exit 0fi}function exiftimexist(){which exiftime > /dev/null 2>&1if [ $? -ne 0 ]; then    echo    echo “Unable to locate exiftime binary”    echo “Please make sure it is installed and is in your path.”    echo    exit 0fi}function gotodir(){cd $1 > /dev/null 2>&1if [ $? -ne 0 ]; then    echo    echo “Directory does not exists”    echo “Please try again.”    echo    exit 0fi}function jpgexist(){find . -iname “*.jpg” -type f >/dev/null 2>&1if [ $? -ne 0 ]; then    echo    echo “There are no JPEG pictures in this directory”    echo “Please try again.”    echo    exit 0fi}function myexifdater(){for i in *.jpgdo    create_date=`exiftime “$i” 2>&1 | grep -i image created | cut -d” ” -f3 | sed -e ’s/:/-/g’`    if [ “$create_date” == “” ]; then        echo -e “SKIPPING IMAGE $i \t\t\t [NO EXIF DATA FOUND]”        continue    fi    echo -n Processing Image $i Created on $create_date    do_rename=$( echo $i | sed -e ’s/(.*)/mv “&” “‘$create_date’_1″/g’|sh)    echo -e \t[DONE]done}usage $1exiftimexistgotodir $1jpgexistmyexifdater

Usage: ExifDater /your/picture/pathDownload the ExifDater script.There is also a Windows version of a program that’s called ExifDater for those who need that :)Source:

Tags: , , , ,

Posted by

23 May 2007 Rotate images depending on the EXIF Orientation Tag

Automatic rotation of JPG images (inclusive EXIF thumbnail) can be performed by using jhead.exe and jpegtran.exe in Windows.

jhead -ft -autorot *.JPG

All JPG-files in that folder will be rotated and file time (time and date of exposure) will be set according to the EXIF info.

Tags: , , ,

Posted by

18 May 2007 Fikse rett dato på bildefil ut i fra EXIF info

Av og til kopierer man bilder og da kan det hende bildefila får feil dato og tid for når bildet ble tatt. Kjør dette scriptet er for å rette dette igjen

Tags: , , ,

Posted by