Moose wrote:
> I finally got around to trying this. It works great.
And here's a version that is more readable and adds ISO, EV and 35mm eq.
fl for selected cameras that aren't FF. You have to enter your own
cameras into the code.
Moose
--------------------------------------------------
<?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);
$evx = round(substr($exifdata['SubIFD']['ExposureBiasValue'], 0, 7), 2);
if ($cammodel == 'Canon PowerShot A650 IS') {
$flmult = 4.73;
} elseif ($cammodel == 'Canon PowerShot A710 IS') {
$flmult = 6.03;
} elseif ($cammodel == 'Canon EOS DIGITAL REBEL') {
$flmult = 1.6;
} elseif (substr($cammodel, 0, 11) == 'FinePix F10') {
$flmult = 4.375;
} elseif (substr($cammodel, 0, 11) == 'FinePix F30') {
$flmult = 4.375;
} else {
$flmult = 1;
}
$fl35mm = round($flmult * $exifdata['SubIFD']['FocalLength'], 1);
if ($flmult == 1)
$fldisplay = "| Focal length: " .
$exifdata['SubIFD']['FocalLength'] . " ";
else
$fldisplay = "| Focal length: " .
$exifdata['SubIFD']['FocalLength'] . " (" . $fl35mm . "mm) ";
if (substr($cammake, 0, 5) <> 'Canon')
$cammodel = $cammake . " " . $cammodel;
echo "<p>Camera: " . $cammodel . " ";
echo "| Exposure time: " . $exifdata['SubIFD']['ExposureTime'] . " ";
echo "| ISO Speed: " . $exifdata['SubIFD']['ISOSpeedRatings'] . " ";
echo ", " . $evx . " EV ";
echo $fldisplay;
echo "| F-stop: " . $exifdata['SubIFD']['FNumber'] . "</p>";
}
?>
==============================================
List usage info: http://www.zuikoholic.com
List nannies: olympusadmin@xxxxxxxxxx
==============================================
|