Extract TIFF tags

images php coding issues or problems here.

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 1
Joined: Fri Nov 18, 2011 3:54 am

Extract TIFF tags

Postby sali12 » Fri Nov 18, 2011 4:01 am

Dear Friends,

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

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";

Return to “PHP coding => Images”

Who is online

Users browsing this forum: No registered users and 1 guest