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

From: Date: Thu, 16 Mar 2006 19:18:56 +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-232049@lists.php.net to get a copy of this message
Thanks again, Tedd. I've checked out the links but still no luck. As I stated (Or implied.) in my first post, I have played with exif_read_data() but it is of little use with the scanned images I've examined. You can see results of my experiments with exif_read_data() and getimagesize() at: http://www.campden-main.com/~orchids/test/test_exif.php You'll note that if I simply divide the dimensions in pixels by the dimensions in inches, I'll get the resolution in PPI. Perhaps the solution to my problem lies in simply finding a way to obtain the dimensions in inches (As either exif_read_data() or getimagesize() will give me the dimensions in pixels.) and just do the math. Again, thanks for your help! Simon simon@freelib.org "tedd" <tedd@sperling.com> wrote in message news:p06230916c03f57197a19@[192.168.1.104]... > Simon: > >>Thank you for your response, Tedd. > > No problem, glad to help if I can. > >>I think so, but I am a bit dense. I'm not concerned with image size but >>rather >>native resolution. Thanks again for taking the time. >>Simon > > Yes, but that's a different question. > > On one hand, you have an image that can be presented in numerous > resolutions. > > On the other hand, how was the image first obtained? > > Some images contain that information, but it's defined by the device that > captured the image, for example: > > http://www.exif.org/samples.html > > In that data set is a host of other information, such as shutter-speed, > flash, focal-length, camera make, model, and such. Check out: > > http://www.digicamhelp.com/what-is-exif/ > > If you want to access these data via php, check out: > > http://us3.php.net/exif > > But understand, not all images contain that information. > > HTH's > > tedd > > -- > -------------------------------------------------------------------------------- > http://sperling.com

« previous php.general (#232049) next »