|ImageMagick slowness extracting EXIF information from JPEG files|
For the book I've been working on a PerlMagick example which takes a directory of images, lets you rotate and label the images, and the publish them to a list of different possible publication directories. It's basically an automation of what I've done with the image publication for this site for some time, but also deuglificated. It also does some nice stuff like display relevant EXIF information for the JPEG files in the HTML pages that it generates, which will be nicer than the igal stuff I currently use.
Yes, I am aware that gallery does a lot of this now, but I need an example for the book, and this gives me a chance to write up exactly what I do now in a nicer form, and make it well documented so that people have a basis for something to hack on in the future.
One of the things that the script does if it hasn't been told how to rotate an image, it tries to guess by looking at the EXIF tags for the images. This presents a problem with the beta version of the code, which I am testing with the photos I took from Andrew's wedding. PerlMagick takes about a second per EXIF tag lookup, which means the the HTML request times out while the CGI script is trying to work out the 312 EXIF tag reads it needs to do to make this happen.
So, I suspect that I'm going to either have to do something ugly to make this all work, or I'm going to need to roll in a different EXIF tag reader.
Tags for this post: imagemagick perlmagick image jpeg exif perl cgi
Related posts: The architecture of PerlMagick; The JPEG still picture compression standard; die() in a CGI; Ruby sample source code; JVC utilities for changing the images and movies on my head unit; MacOS' RSS screen saver really unreliable?
posted at: 02:54 | path: /imagemagick | permanent link to this entry