Re: Resize an image from URL

From: Date: Tue, 10 Dec 2002 11:23:24 +0000
Subject: Re: Resize an image from URL
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-127622@lists.php.net to get a copy of this message
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: http://www.daubnet.com/formats/GIF.html hth loki# 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)


« previous php.general (#127622) next »