Re: Accessing tags with PHP



On Fri, 2006-06-23 at 20:39 +0300, Dotan Cohen wrote:
> I have set up f-spot to store the tags in the picture files
> themselves. How can I access these tags with PHP? I do know how to
> access IPTC tags with PHP but not the tags that f-spot uses. A simple
> working code example would be very, very much appreciated.
> 
> Also, are the tags UTF-8? If not, what charset are they?
> 
> This is the code that I use to access IPTC:
> <?php
> $size = GetImageSize ("/path/to/pic.jpg", &$info);
> $iptc = iptcparse($info["APP13"]);
> 
> print "Keywords: ".$iptc["2#025"][0]."<br />";
> print "People: ".$iptc["2#118"][0]."<br />";
> print "Place: ".$iptc["2#027"][0]."<br />";
> print "Event: ".$iptc["2#105"][0]."<br />";
> print "Date: ".$iptc["2#055"][0]."<br />";
> print "Time: ".$iptc["2#060"][0]."<br />";
> ?>
> 
> Note that the IPTC tags used here are not to standard, they are as per
> the excellent windows software BrilliantPhoto.

As far as I know, f-spot stores tags in XMP metadata, so you'll have to
extract it from XMP, not IPTC (but I could be wrong).

Kind regards,
   Ruben Vermeersch


--
Ruben Vermeersch (rubenv)
http://www.Lambda1.be/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]