November 9th, 2001, 02:30 AM
Probably a dumb question
But who knows? ^ ~
In internet explorer when you right click on an image and choose properties, the browser can then tell you the dimensions of the image you are asking about.
My question is can you retrieve that information from an image for use in scripting? Like is there an image.width attribute I can call to in order to get the width of an image, or something like that.
If there is such a way to get dimensions, I'd love to be shown how to retrieve it. *hint hint*
Thanks in advance ^^
November 9th, 2001, 03:01 AM
From the php.net website:
The GetImageSize() function will determine the size of any GIF, JPG, PNG or SWF image file and return the dimensions along with the file type and a height/width text string to be used inside a normal HTML IMG tag.
Returns an array with 4 elements. Index 0 contains the width of the image in pixels. Index 1 contains the height. Index 2 a flag indicating the type of the image. 1 = GIF, 2 = JPG, 3 = PNG, 4 = SWF. Index 3 is a text string with the correct "height=xxx width=xxx" string that can be used directly in an IMG tag.
Check out http://www.php.net/manual/en/function.getimagesize.php
November 9th, 2001, 01:17 PM