Skip to content

Instantly share code, notes, and snippets.

@avinash2
Created February 25, 2011 08:24
Show Gist options
  • Save avinash2/843522 to your computer and use it in GitHub Desktop.
Save avinash2/843522 to your computer and use it in GitHub Desktop.
<?php
$file = "img/15.jpeg";
$data = exif_read_data($file);
// Let's create a new array that will store the required image properties and values
$img = array();
$img["name"] = $data['FileName'];
$img["make"] = $data['Make'];
$img["model"] = $data['Model'];
$img["software"] = $data['Software'];
$img["time"] = $data['DateTime'];
$img["expo_time"] = $data['ExposureTime'];
$img["iso"] = $data['ISOSpeedRatings'];
$img["height"] = $data['COMPUTED']['Height'];
$img["width"] = $data['COMPUTED']['Width'];
$img["ccd"] = $data['COMPUTED']['CCDWidth'];
echo "<ul>";
foreach ($img as $key => $value) {
echo "<li>";
echo "<strong>{$key}</strong>" . " : " . $value . "<br />";
echo "</li>";
}
echo "</ul>";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment