Re: Package Proposal: Image_JPEG

From: Date: Tue, 06 May 2003 20:59:59 +0000
Subject: Re: Package Proposal: Image_JPEG
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-15958@lists.php.net to get a copy of this message
Hi, +1 for the new package/class. Please change your in-code comments to PHPDoc format, you can do this relatively quickly, check out http://www.phpdoc.org/manual.php for detailed information on how to do this. You will benefit from using a DocBlock template for the private methods /**#@+ * @access private */ function _privmethod() {...} ... /**#@-*/ Regards, Greg Sebastian Delmont wrote:
I would like to propose a new package: Image_JPEG It allows you to manipulate the contents of a JPEG file, including reading and writing metadata information like EXIF and IPTC. You can take a look at the source code here: http://www.zonageek.com/software/files/php/JPEG.php-0.1.txt Sample usage would look like: require_once 'Image/JPEG.php'; $jpeg =& new JPEG('images/photos001.jpg'); echo $jpeg->getExifField("ApertureValue"); echo $jpeg->getIPTCField("Caption"); $jpeg->setIPTCField("Byline", "Sebastian Delmont"); $jpeg->save("images/photos001-bis.jpg"); The current version doesn't provide decoding or encoding of the image data itself, but that could be added in the future. The class implements full parsing and generation of the JFIF image format (that's the formal name of what we all know as JPGs), EXIF data, Adobe Data and IPTC Data. In the future this package could be complemented with other packages like Image_TIFF, Image_PSD, Image_GIF and Image_PNG. The current code works and has been tested, but lacks documentation. I would probably do a beta release first until I get some feedback and meanwhile work on the docbook docs. Regards, Sebastian Delmont


« previous php.pear.dev (#15958) next »