Thanks. I might give the new versions a try :)

IIRC, I think the unix exif function returns dpi as well but I'm working on 
a windows machine without cygwin, so can't be certain.


""Richard Lynch"" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> 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 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to