RE: [PEAR-DEV] JPEG Metadata Package
| From: | Patrick O'Lone | Date: | Mon, 05 May 2003 21:04:02 +0000 |
| Subject: | RE: [PEAR-DEV] JPEG Metadata Package | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-15913@lists.php.net to get a copy of this message | ||
It seems to me that a JPEG file is composed of an aggregate of
Image_IPTC and Image_EXIF. It seems wrong to inherit Image_TIFF from
Image_JPEG. Note that Image_IPTC does not require the PHP user to have
to recompile PHP for exif support (--enable-exif) - it works with a
default out-of-the-box installation.
It might be better to have an Image_Metadata class from which Image_IPTC
and Image_EXIF inherit, however, since both must use imagegetsize() and
both probably have a commit() or save() method of some sort. This would,
of course, change our class names to the names of:
Image_Metadata_IPTC
Image_Metadata_EXIF
It would seem to me also, that an Image_JPEG class when then have the
ability to include those classes and create a composition of both. The
same would be true of a TIFF and perhaps a PSD file.
If you have questions, comments, or suggestions about the aforementioned
message, you can respond by replying to this message or contacting us at
(309)-743-0800. Thank you.
Regards,
Patrick O'Lone
Internet Software Engineer
TownNews.com
(309)-743-0809
polone@townnews.com
> -----Original Message-----
> From: Sebastian Delmont [mailto:sdelmont@zonageek.com]
> Sent: Monday, May 05, 2003 2:35 PM
> To: pear-dev@lists.php.net
> Subject: Re: [PEAR-DEV] JPEG Metadata Package
>
>
>
> > A problem with releasing all of them in a JPEG package is that TIFF
> > files can also have IPTC headers.
> >
>
> That's a very good point...
>
> TIFF and JPEG are the only Image formats that share a big chunk of
> structure. Actually, add Photoshop's PSD to that list. No other
> "popular" format uses IPTC (as far as I know).
>
> The "exif" part of JPEG is actually a partial TIFF file. And
> "iptc" is
> actually a partial PSD file. So my Image_JPEG already has 99% of the
> code needed to parse TIFF and PSD files.
>
> Creating a global Image_Metadata module would be too ambitious, and I
> don't want to spend time creating a single universal metadata
> abstraction that can cover PNG, GIF, BMP, etc... After all, there's a
> reason I'm using PHP instead of Java. And most of those formats don't
> have any metadata at all besides the image dimensions and
> perhaps some
> comments.
>
> Creating a single Image_JPEGTIFFPSD module is actually rather simple.
> But naming that module might be an issue... JPEGTIFFPSD
> doesn't actually
> sounds right, at least not to me... Image_JPEG, Image_TIFF
> and Image_PSD
> sound better, and Image_TIFF and Image_PSD could be very
> simple classes
> inheriting everything from Image_JPEG. I don't really know how PEAR
> would handle something like this, but in the worst case it would mean
> indicating a dependency between the packages.
>
> Another choice would be Image_IPTC + Image_EXIF, but that makes using
> the package much harder, since you might need two different
> objects to
> manipulate a single file. Two separate parsings, two separate saves,
> etc... And trying to hide those using a shared object or
> something like
> that would be a lot more complex.
>
> I haven't worked on Image_TIFF or Image_PSD yet for lack of time and
> necessity, but again, they would be very simple to implement.
>
> Anyway... that's just my opinion ;-)
>
> Regards,
> Sebastian
>
>
>
>
> --
> PEAR Development Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>