Moose wrote:
> Dan Mitchell wrote:
>> For what it's worth, I've patched my singapore install to display
>> exif info -- not all that hard, and I can pass on instructions if
>> you like.
>>
> That would be lovely, thank you.
1: get exifer, URL is
http://www.offsky.com/software/exif/index.php
2: extract makers/ and exif.php to [singapore]/includes
3: in image.tpl.php, add this at the appropriate place. Tweak to
change layout/formatting as desired. I put it after the sgContent div,
for what it's worth.
<?php
require_once('includes/exif.php');
$exifdata = read_exif_data_raw($sg->image->realPath(), 0);
if ($exifdata['IFD0']['Make'] != "")
{
$cammake = $exifdata['IFD0']['Make'];
$cammodel = $exifdata['IFD0']['Model'];
// Remove trailing ? from camera info. Why is it there?
$cammake = substr($cammake, 0, -1);
$cammodel = substr($cammodel, 0, -1);
echo "<p>Camera: " . $cammake . " " . $cammodel . " ";
echo "Focal length: " . $exifdata['SubIFD']['FocalLength'] . " ";
echo "Exposure time: " . $exifdata['SubIFD']['ExposureTime'] . " ";
echo "f stop: " . $exifdata['SubIFD']['FNumber'] . "</p>";
}
?>
That may seem like weird bits of info to be pulling out, but if you
read "f stop", for instance, you get things like "28/10" -- which is
correct, but not what I was expecting.
If you want a dump of everything to poke around in, this'll get it:
print_r($exifdata);
Examples:
http://www.danielmitchell.net/gal/Baby/07_Sep_16-Oct_31&image=PA099591.jpg
http://www.danielmitchell.net/gal/Baby/07_Sep_16-Oct_31&image=IMG_3578.jpg
(works with canon as well)
http://www.danielmitchell.net/gal/Baby/07_Sep_16-Oct_31&image=PA149696.jpg
(with the 50/1.4, there's no focal length/fstop info)
> Singapore is great for having places ready to just add images at random
> as they come up, but I got tired of the labeling.
Yeah, I know the feeling -- I only really index pictures where there's
a story behind them, if it's just baby photos I figure people can work
out what's going on themselves.
> My plan is to index everything and slowly go through setting up
> keywords, names, descriptions, etc. so I want gallery apps that can use
> those without reentry.
Theoretically, Singapore expects exif info to be put into singapore's
metadata -- pulling it out every time the page is rendered is not the
most efficient way, but I didn't feel like working out how to push the
exif info into the various metadata files either.
-- dan
==============================================
List usage info: http://www.zuikoholic.com
List nannies: olympusadmin@xxxxxxxxxx
==============================================
|