Re: How does one obtain the resolution of an image in PHP?

From: Date: Thu, 16 Mar 2006 19:38:48 +0000
Subject: Re: How does one obtain the resolution of an image in PHP?
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-232051@lists.php.net to get a copy of this message
On Thu, March 16, 2006 1:31 pm, John Hinton wrote: > Simon M. Campden-Main wrote: >> Well, there's the meat of it, isn't it? I wonder how Paint Shop Pro >> comes >> up >> with PPI (Image - Image information). I have several thousand >> scanned >> images >> with resolution ranging from 72 PPI up to 1200 PPI (As reported by >> Paint >> Shop >> Pro) and want to discard, or more likely tag as rejected, any that >> suffer a >> resolution of less than 150 PPI. As you might imagine, I find the >> thought >> of >> doing it manually with Paint Shop Pro repugnant. >> >> > PPI or pixels per inch is a printing term. It has nothing to do with > viewing on a monitor as a monitor's pixel setting is your set > resolution, as in 800x600, 1024x768, 1600x1200.. etc. This is a > constantly debated urban legend. A pixel on a monitor is a pixel... But there is SOME kind of data embedded in some images providing the resolution at which they will/should be printed... Because *SOMETIMES* http://php.net/getimagesize provides a reasonable "resolution" in its result array. 'Course, sometimes it's full of crap, too... Thing is, if you go changing those settings, and then save and then print the two versions, you'll get quite different printer output. So OBVIOUSLY the files are different, in some way that printers understand, even if PHP only half-understands it. 'Twould be nice if PHP was as smart as a printer :-) :-) :-) YMMV -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#232051) next »