Posts: 1,832
Location: Somewhere else entirely
|
If you have the GD libraries available (a lot of hosts already do), you can use them to do this:
PHP Code:
$image = imagecreatefromjpeg($filename); //or $image = imagecreatefromgif($filename);
^ This will get you a handle to the image, you an use the filetype($filename) function to determine whether it is a gif, jpeg, png, bmp or whatever, and call the right creation function ( a complete list is here:
http://www.php.net/manual/en/ref.image.php )
imagesx($image) will get you the width and imagesy($image) will get you the height in pixels.
filesize($filename) will give you the filesize (in bytes I think).
__________________
UPDATE 0beron SET talkupation = talkupation + lots WHERE post = 'helpful';
Please login or register to view this content. Registration is FREE (aka MSN handwriting for forums)
|