by prettyscripts on 2008-12-04 14:11:21
to access basic image information like width and height, call getimagesize(), which returns data in array format as follows
Code:
Array | |
( | |
[0] => 640 // width | |
[1] => 426 // height | |
[2] => 2 // not sure what this is. anyone? | |
[3] => width="640" height="426" // for <img> param | |
[bits] => 8 | |
[channels] => 3 | |
[mime] => image/jpeg // mime type | |
) |
note: this function does not require gd library.