Re: Finding out DPI using GD

From: Date: Tue, 14 Feb 2006 23:37:01 +0000
Subject: Re: Finding out DPI using GD
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-230396@lists.php.net to get a copy of this message
On Tue, February 14, 2006 2:15 pm, Karuna wrote: > Hi. Is it possible to find out the dpi of an image (preferably jpeg) > in php? > I can't seem to find any function to do this. http://php.net/getimagesize However, I have found that: 1. EXIF data in the JPEG will make it puke. 2. It doesn't seem to always correctly calculate width/heigh/DPI independently -- It seems like the numbers get shifted so that the total: $WIDTH * $HEIGHT * $DPI is correct, but not the individual numbers... This has been my experience with a large variety of images from disparate sources, many of which are probably badly-formated JPEGs in the first place, so it may be a non-concern if you have quality image-editing tools making the JPEGs. Note that PDI info is returned only in "recent" versions of PHP / GD. -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#230396) next »