RE: [PHP] Image Height and Width
| From: | Maxim Maletsky | Date: | Tue, 14 Nov 2000 10:24:36 +0000 |
| Subject: | RE: [PHP] Image Height and Width | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-25170@lists.php.net to get a copy of this message | ||
GetImageSize($image);
will return you all the staff including a piece of HTML to use.
I use this to make myself a sweet IMG tag:
function graphic($image='')
{
Global $DOCUMENT_ROOT;
$image = '/images/'.$image.'.gif';
$full_pass = $DOCUMENT_ROOT.$image;
if (file_exists($full_pass))
{
$image_sizes =GetImageSize($full_pass);
$img_src = '<img src="'.$image.'" '.$image_sizes[3].'
border="0">';
return $img_src;
} else return false;
}
it canb also tell you the size, type as well as width and height..
Cheers!
Maxim Maletsky
-----Original Message-----
From: Durrani [mailto:durrani@comatindia.com]
Sent: Tuesday, November 14, 2000 7:29 PM
To: php-general@lists.php.net
Subject: [PHP] Image Height and Width
Hi PHP's
How cud i get the properties of a image file when it is uploaded. I am
getting the picture size in bytes... but i wud also like to get, the width
and height of the particular image.
Regards
Durrani.
When we right click on an image and see the properties, in the browser, it
gives the width and height of the image... i want to get them.
Please reply to durrani@comatindia.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net