[PHP] Picture Width and Height in $_FILES

2003-12-01 Thread Dimitri Marshall
Hi there,
I've seen the code somewhere but can't remember what it is exactly.
Basically I need to know what the PHP is to get the picture width and
height.

I tried:

 $pic = $_FILES[$objectNumber];
 $width = $pic['width'];
 $height = $pic['height'];

... with no success.

Any help is greatly appreciated.

Thanks,
Dimitri Marshall

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Picture Width and Height in $_FILES

2003-12-01 Thread Richard Davey
Hello Dimitri,

Tuesday, December 2, 2003, 2:40:27 AM, you wrote:

DM> I've seen the code somewhere but can't remember what it is exactly.
DM> Basically I need to know what the PHP is to get the picture width and
DM> height.

Use getimagesize() on the uploaded file. See PHP manual for details.

-- 
Best regards,
 Richardmailto:[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Picture Width and Height in $_FILES

2003-12-02 Thread Wouter van Vliet
On dinsdag 2 december 2003 3:40 Dimitri Marshall told the butterflies:
> Hi there,
> I've seen the code somewhere but can't remember what it is exactly.
> Basically I need to know what the PHP is to get the picture
> width and height.
> 
> I tried:
> 
>  $pic = $_FILES[$objectNumber];
>  $width = $pic['width'];
>  $height = $pic['height'];
> 
> ... with no success.
> 
> Any help is greatly appreciated.
> 
> Thanks,
> Dimitri Marshall

There's this "getimagesize()" function, it will tell you everything about an
image that you need to know. Even who made it, if that's in the exif headers
:P.

Wouter

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php