Re: Package Proposal: Image_JPEG

From: Date: Tue, 06 May 2003 21:14:16 +0000
Subject: Re: Package Proposal: Image_JPEG
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-15960@lists.php.net to get a copy of this message
Have you considered Patrick's offer to merge your stuff with Image_IPTC? I guess this sounds like a very nice solution in order to avoid redundant packages.
I have... but I think it's best to have them as two separate classes. Patrick's class (Image_IPTC) is a wrapper around the iptcembed and iptcdecode functions. So it uses compiled C code and has a narrower objective. So it will probably be faster... but limited. My package (Image_JPEG) on the other hand can do pretty much anything that Image_IPTC can, but it can also do a lot more, including writing EXIF data (I haven't seen any other code to do this) and giving access to every single byte of the JPEG file. But since it's PHP code, it is slower. I can't see a way of using iptcembed/decode on my package to make it faster without at the same time making it a lot harder to read/write the rest of the data on the file. So I can't see a way of achieving the same performance you might get with Image_IPTC. On the other hand, I can't see a way of using the Image_IPTC approach to provide all the additional functionality in Image_JPEG. Ideally we would have a single module with a fast implementation... but until that can be done, I think we're better off having a full but slow implementation (JPEG) and a fast but partial one (IPTC).

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