ID:               26335
 User updated by:  stephane dot rochon at free dot fr
 Reported By:      stephane dot rochon at free dot fr
 Status:           Bogus
 Bug Type:         GetImageSize related
 Operating System: XP
 PHP Version:      4.3.3
 New Comment:

Thank you for your replay. I checked again, and yes both files have the
same IPTC data. I can read it with softares lake Fotostation Pro, but
not with the PHP code.

Cheers,


Previous Comments:
------------------------------------------------------------------------

[2003-11-23 20:23:06] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

According to image analysis tools I have here the tiff image does not
contain any valid IPTC data.

------------------------------------------------------------------------

[2003-11-21 03:36:16] stephane dot rochon at free dot fr

Hello, thanks for your help !

Here is the code you can test here :
http://www.subphoto.com/IPTC/IPTC_lecture.php

with images : 
http://www.subphoto.com/IPTC/dauphin.jpg
http://www.subphoto.com/IPTC/dauphin.tif

There is one caption and three keywords in each image files.

<? 
echo "JPEG file info : ";
print_r(getImageSize('dauphin.jpg')); 
echo "<br>";

echo "TIFF file info : ";
print_r(getImageSize('dauphin.tif')); 
echo "<br>";

echo "IPTC fields for JPEG file :";
$size = getimagesize ("dauphin.jpg",&$info);
if (isset ($info["APP13"])) {
    $iptc = iptcparse ($info["APP13"]);
    var_dump ($iptc);
} 
echo "<br>";

echo "IPTC fields for TIFF file :";
$size = getimagesize ("dauphin.tif",&$info);
if (isset ($info["APP13"])) {
    $iptc = iptcparse ($info["APP13"]);
    var_dump ($iptc);
} 
echo "<br>";
?>

------------------------------------------------------------------------

[2003-11-20 19:24:41] [EMAIL PROTECTED]

Please supply the images used in your tests.

------------------------------------------------------------------------

[2003-11-20 14:17:46] stephane dot rochon at free dot fr

Description:
------------
I have to image files. One is a jpeg and one is a tiff. They have the
same IPTC data embeded using Fotostation Pro.

When I read the jpeg header, I have all the IPTC information, when I
read the tiff header, I get nothing.

That's all !

Cheers,

Stephane

Reproduce code:
---------------
$size = getimagesize ("D:\image.tif",&$info);
if (isset ($info["APP13"])) {
    $iptc = iptcparse ($info["APP13"]);
    var_dump ($iptc);
}

Expected result:
----------------
That's what I get with the JPEG file :

array(6) { ["2#000"]=> array(1) { [0]=> string(2) "" } ["2#120"]=>
array(1) { [0]=> string(19) "Christ of the Abyss" } ["2#005"]=>
array(1) { [0]=> string(18) "Christ des Abysses" } ["2#025"]=>
array(28) { [0]=> string(10) "underwater" [1]=> string(4) "park" [2]=>
string(7) "reserve" [3]=> string(5) "glory" [4]=> string(5) "jesus"
[5]=> string(5) "power" [6]=> string(4) "soul" [7]=> string(5) "light"
[8]=> string(9) "pennekamp" [9]=> string(4) "jhon" [10]=> string(5)
"largo" [11]=> string(3) "key" [12]=> string(4) "keys" [13]=> string(7)
"florida" [14]=> string(6) "statue" [15]=> string(4) "deep" [16]=>
string(5) "water" [17]=> string(5) "angle" [18]=> string(4) "wide"
[19]=> string(5) "abyss" [20]=> string(6) "christ" [21]=> string(10)
"silhouette" [22]=> string(6) "prayer" [23]=> string(3) "god" [24]=>
string(5) "peace" [25]=> string(3) "sun" [26]=> string(5) "faith"
[27]=> string(4) "blue" } ["2#231"]=> array(1) { [0]=> string(1280) "X
22/09/2003 13:28:30 Texte enregistr�X 02/10/2003 20:03:12 Texte
enregistr�X 08/11/2003 21:16:19 Texte enregistr�X 08/11/2003 23:25:00
Texte enregistr�X 08/11/2003 23:27:11 Texte enregistr�" } ["2#240"]=>
array(1) { [0]=> string(2368) "" } 

Actual result:
--------------
That's what I get with the TIFF file :

Notice: Undefined index: APP13 in D:\Web\read_IPTC.php on line 19



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=26335&edit=1

Reply via email to