Page 1 of 1

Newbie: IPTC APP13

Posted: Thu May 14, 2009 1:16 pm
by mcl
I am a total novice at this.

I have added a caption to 3 JPG files, with XNVIEW. If I look at them with XNVIEW, they are all still there.

I am using PHP to try to get at that data, but it is not appearing.

I am looping through a directory, which contains several JPGs including the 3, I have added a 'Caption' to. Only one gives me an APP13 entry and that appears to have come from a Photoshop edit sometime in the past.

I am using the following code.
-----------------------------------------------------------------
function getIPTC_Data( $file ) {
$size = getimagesize ( $file, &$info);
var_dump($info);
echo BN;
if(is_array($info)) {
$iptc = iptcparse($info["APP13"]);
foreach (array_keys($iptc) as $s) {
$c = count ($iptc[$s]);
for ($i=0; $i <$c; $i++)
{
echo $s.' = '.$iptc[$s][$i].'<br>';
}
}
}
}
---------------------------------------------------------

Any help or guidance, would be gratefully appreciated.

Richard