getFilename(); $exif = exif_read_data($my_file); create_metadata($file->getGUID(), "tp_exif", serialize($exif), "string", $file->getObjectOwnerGUID(), 2); } function tp_exif_formatted($file_guid) { $metadata_exif = get_metadata_byname($file_guid, "tp_exif"); if($metadata_exif) { $exif = unserialize($metadata_exif["value"]); //got the code snippet below from http://www.zenphoto.org/support/topic.php?id=17 //convert the raw values to understandible values $Fnumber = explode("/", $exif['FNumber']); $Fnumber = $Fnumber[0] / $Fnumber[1]; $Focal = explode("/", $exif['FocalLength']); $Focal = $Focal[0] / $Focal[1]; //prepare the text for return $exif_text = "Model: ".$exif['Model']."
"; $exif_text .= "Shutter: ".$exif['ExposureTime']."
"; $exif_text .= "Aperture: f/".$Fnumber."
"; $exif_text .= "ISO Speed: ".$exif['ISOSpeedRatings']."
"; $exif_text .= "Focal Length: ".round($Focal)."mm
"; $exif_text .= "Captured: ". $exif['DateTime']; return "$exif_text"; } else { return false; } } ?>