I want to extract TIFF tags , such as resolution , image size and etc.
i have found the below code, but i doesn't work. i think, i need to add a library to my PHP
who knows how can i do it ?
Thanks in advance
- Code: Select all
<?php
echo "test1.tiff:<br />\n";
$exif = exif_read_data('tests/test1.tiff', 'IFD0');
echo $exif===false ? "No header data found.<br />\n" : "Image contains headers<br />\n";
$exif = exif_read_data('tests/test2.tiff', 0, true);
echo "test2.jpg:<br />\n";
foreach ($exif as $key => $section) {
foreach ($section as $name => $val) {
echo "$key.$name: $val<br />\n";
}
}
?>

