PHP getimagesize()

Wondering how to find out the size of your image? getimagesize() returns a lovely array containing the height and width of the image, along with a few other bits of data. In fact, one of the array values is even a nice little string containing height="yyy" width="xxx" that can be used directly in an IMG tag.

See the php manual entry for more info on this, as well as a number of other nifty image data gathering functions.


Post a Comment