Re: [PEPr] Call for votes on Images::JpegMarkerReader

From: Date: Wed, 11 Jun 2008 13:29:12 +0000
Subject: Re: [PEPr] Call for votes on Images::JpegMarkerReader
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-50269@lists.php.net to get a copy of this message
Sure. Every JPEG file is structured as a collection of markers. So to discover interesting things about a JPEG file, you need to be able to read markers. By creating a low-level marker reader class (Image_JpegMarkerReader), I've provided an easy way to "scroll through" a JPEG programmatically, looking for information that's relevant to your application. This becomes useful when you want to build something like Image_JpegXmpReader, which extracts Adobe's XMP metadata from a JPEG, giving you the title, description, tags, etc. that the user chose to describe the image (usually in Photoshop). XMP metadata lives in a particular JPEG marker (APP0), with a particular prefix identifying it specifically as XMP (there are other uses of the APP0 marker, with their own signatures). I separated the marker-reading and XMP-reading functionality into parent and child classes so that other programmers can build other interesting JPEG-related tools that also parse JPEGs via JpegMarkerReader. -Tom On Wed, Jun 11, 2008 at 8:44 AM, till <klimpong@gmail.com> wrote: > Hey Thomas, > > can you explain briefly what markers are and what they are used for? I > couldn't figure this out. > > Till >

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