RE: [PHP-DB] Find out a pic size?
| From: | Davy Obdam | Date: | Mon, 11 Nov 2002 18:56:49 +0000 |
| Subject: | RE: [PHP-DB] Find out a pic size? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-23222@lists.php.net to get a copy of this message | ||
Hi There,
You could also use the getimagesize(); function for this
<?php
$image=getimagesize(images/image01.jpg);
Echo"
<img src=\"image01.jpg" ".image['3'].">";
?>
This will give <img src="image01.jpg" width=" " height=" ">
Hope this helps
Best regards,
Davy Obdam
mailto:info@davyobdam.com
> -----Oorspronkelijk bericht-----
> Van: milisphp [mailto:milis@indoinformatika.com]
> Verzonden: maandag 11 november 2002 7:38
> Aan: php-db@lists.php.net
> Onderwerp: [PHP-DB] Find out a pic size?
>
>
> Hi,
>
> I'm working with a lot of picture in a website and the size
> is not always the same.
>
> I need some help on how to find out the size (width and
> height) of a picture. Is there any way to do this (especially
> with PHP)?
>
> I need it so I can calculate the width and height to be
> specified on the HTML <img> tag.
>
> Thanks,
>
> Hansen
> IndoInformatika
>