Discussion
fb_exif.php fix(back to index)I get good results if I round $fbaperture to one decimal place. Without it I get some fairly hefty apertures (e.g. f/5.59999901 instead of f/5.6). I suspect this is due to the export software I'm using (Bibble Pro) but it is very easy to fix:
line 21:
$fbaperture = "f/" . ($num/$den); -> $fbaperture = "f/" . round($num/$den, 1);
posted by
lewiz on 14 Feb 06 at 6:58 PM
Must definitely be Bibble Pro. I've reworked the first bunch of lines that calculate fbexposure so that they work with the odd EXIF values. Here are my results:
if(isset($data["ExposureTime"])) {
list($num,$den) = explode("/",$data["ExposureTime"]);
if ($num > $den) {
$fbexposure = "{$num}s";
} else {
$den = round($den/$num);
$fbexposure = "1/{$den}s";}
}
Somehow the two values that determine the shutter speed are massive, so checking if $num!=1 doesn't help. A quick check if it is > $den does the trick. I then also rounded the exposure as per the first post. This does the job. I'm not sure what will happen when $num <= $den... I guess this will go crazy. Another post when I happen across that ;)
posted by
lewiz on 14 Feb 06 at 7:10 PM
Post a Reply:
(back to index)