Re: Finding out DPI using GD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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"" <ceo@xxxxxxxxx> wrote in message 
news:60223.67.108.68.36.1139960221.squirrel@xxxxxxxxxxxxxxxx
> 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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux