Re: Re: IPTC image comments utility
| From: | Paul Furman | Date: | Fri, 13 Feb 2004 06:06:18 +0000 |
| Subject: | Re: Re: IPTC image comments utility | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-177570@lists.php.net to get a copy of this message | ||
Andy Crain wrote:
This might help: http://pear.php.net/package/Image_IPTC AndyThanks, I don't know why I didn't find that. No documentation though and some unfamiliar stuff with @ and references to other commands which I guess this replaces (not sure). If so I can't figure out how to run the thing. Below is some snippage from the code trying to get at how to use it. I'm still interested in whether I can get the perl module to run with PHP, it sounds like it may be a bit more reliable. I've got perl loaded but don't know how to use it. <snippage> * This class encapsulates the functions iptcparse() and iptcembed(). It provides * the necessary methods for extracting, modifying, and saving IPTC data with * image files (JPEG and TIFF files only). class Image_IPTC
var $_sFilename = null;
var $_aIPTC = array();
* The IPTC fields that were extracted from the image
* or updated by this class.
var $_bIPTCParse = false;
* set to true if the APP header data could be obtained.
iptcparse (places where I saw this)
http://us4.php.net/iptcparse
function Image_IPTC( $sFilename )
$this->_aIPTC = @iptcparse($aAPP['APP13']);
$this->_bIPTCParse = true;
function isValid()
return $this->_bIPTCParse;
function getAllTags()
return $this->_aIPTC;
* An array of IPTC fields as it extracted by iptcparse()
iptcembed (places where I saw this)
http://us4.php.net/iptcembed
one comment refers to the Image::IPTCInfo Perl module
-undocumented, some serious compatibility problems, improper format
function save( $sOutputFile = null )
$sImageData = @iptcembed($sIPTCBlock, $this->_sFilename, 0);
function output()
@iptcembed($sIPTCBlock, $this->_sFilename, 2);
Paul Furman wrote: OK this looks like the thing: http://multipart-mixed.com/photo/iptc.html It's a perl module. Can I use that in PHP?