On Tue, 10 Dec 2002, fragmonster wrote:

> I want to resize an image from an URL if it is too large. Is there a way 
> to know the size (width and height) of an image from an url without 
> download it?
> 
> For exemple: getWidth(http://www.toto.com/imlage.gif)

        Depending on the version of PHP youre using you can use either
        PEAR's Image_Remote class:

                http://pear.php.net/package-info.php?pacid=42

        Or PHP's native getImageSize() 

                http://fi.php.net/manual/en/function.getimagesize.php

        To remotely get the dimensions of image file. IIRC the native
        functions supports this since 4.0.5 and looking at the code
        it does not download the whole image but parses the first few
        bytes of the imagefile header (the same way as Image_Remote
        does).


-- 
Mika Tuupola                      http://www.appelsiini.net/~tuupola/


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

Reply via email to