Re: [PHP] Resize an image from URL
On Tuesday 10 December 2002 18:52, fragmonster wrote: Hi, 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) No. PHP is good, but not *that* good. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Common sense and a sense of humor are the same thing, moving at different speeds. A sense of humor is just common sense, dancing. -- Clive James */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Resize an image from URL
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