Plogger exif data from Nokia 6280

To manage the photo album on this site I use some server software called Plogger. When I load photos it reads the exif data and stores some of it in the application database. It uses the ‘Date picture taken’ field to sort the thumbnails within each section. It also displays extra details for each photo, for example:

Dimensions 1600 x 1200
File size 644.58 kbytes
Taken on 2009:12:07 10:27:29
Camera model KONICA MINOLTA DiMAGE Z3
Shutter speed 1/400 sec
Focal length 23.296875 mm
Aperture f 4.5

It works perfectly with our Minolta camera, but I also use my Nokia 6280 phone to take pictures. This phone is a few years old but it really does take a nice snap. From what is essentially a high-tech box brownie the results are excellent: reasonably sharp, high colour saturation and good in low-light. The only annoying thing is that it doesn’t include anything in the exif ‘Date picture taken’ field. This means that photos taken on the Nokia end up lumped together in the photo album rather then in correct chronological order with those taken using the Minolta camera. The jpg file has ‘Date Modified’ which is equal to the time the picture was taken but plogger can’t make use of that.

So the problem is how to take the file’s ‘date modified’ and add it to the exif ‘Date picture taken’ field.

I first tried jhead which is a command-line exif editor. It is great for jobs like adjusting the date on a batch of photos. For example, if your camera’s date/time has been accidentally reset and you have a big batch of photos with the incorrect date then jhead can be used to adjust the date or time by a certain amount. It can even take the file date and add it to the exif ‘Date picture taken’ field. Unfortunately it can’t do that if the field is completely absent from the exif header. jhead can create a new exif header with an empty field but that also removes any exif fields which do exist, such as Camera Model.

So I investigated other free exif editors. ExifEditor and Exifer can both manually add ‘Date picture taken’ data but it is laborious. I couldn’t find anything which can batch process this. This is what I ended up doing:

  • use Exifer to batch add a ‘Date picture taken’ value – doesn’t matter what it is,
  • use jhead to alter that value to the file’s Date Modified value, using this command:
    jhead -dsft *.jpg
    which means, for all jpg files in the current folder set the exif time to the file modification time

Unfortunately this is a 2-step process, but it does work.