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

From: Date: Thu, 16 Mar 2006 19:31:38 +0000
Subject: Re: How does one obtain the resolution of an image in PHP?
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-232050@lists.php.net to get a copy of this message
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... Pixels per inch are used in the printing world and relates to how many pixels are used to provide one inch of printed space. Obviously, at least up to the limits of the printer being used, a high PPI setting produces a higher quality 'printed' image. If you don't believe me, use your paint program, change the PPI of an image and notice how the image doesn't change size on the screen. Also, do this and switch the image size display back and forth between inches and pixels.. the pixel count doesn't change, only the inches change.. but again... that's the printing world and has nothing to do with display on a monitor or webbrowser. So, an image 10,000pixels by 10,000pixels will be huge on screen. If set to a resolution of 1000ppi, the image would be printed at 10" x 10", but you still can't view the whole image on a monitor without zooming out. If resolution we set to 10,000dpi, the image would print as 1" x 1", but you still wouldn't be able to view it on a monitor (unless you have an awesome multi-display setup that can reach 10,000 pixels wide and tall). That's the bottom line. So, I keep seeing 'display size' when I'm thinking the term should be 'printed size'. John Hinton

« previous php.general (#232050) next »