I dont believe that such a function would already exist. If saving network bandwidth is your aim, you can open an HTTP connection yourself, read only the first 10 bytes, and close the connection. The first six bytes of an GIF image is always 'GIF87a' or 'GIF89a'. Then comes the width as a 16-bit integer (LSB first), and then the height, also as a 16-bit integer.

see details of the format here:


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)

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

Reply via email to