Quick imageSize question
| From: | Mag | Date: | Wed, 13 Oct 2004 14:37:29 +0000 |
| Subject: | Quick imageSize question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-199377@lists.php.net to get a copy of this message | ||
Hi,
I am just experimenting with images and uploading,
I have written a script that successfully uploads imgs
and I am using this to get the file dimensions:
$a = getimagesize("a.jpg");
echo $a[0] . " " .$a[1] . " " . $a[3];
The problem with the above is I can only get the
dimensions AFTER the file has been uploaded and is on
disk,which is quite a pain in the ... coz I want to
accept only images that are smaller than x pixels
width and then i have to tell the client that their
upload failed coz their image is too big...is there
any way to get the dimensions before the upload is
done?
I have GD 2+ if that helps.
Thanks,
Mag
=====
------
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com