Re: image size?
| From: | Tom Rogers | Date: | Fri, 10 Sep 2004 07:18:03 +0000 |
| Subject: | Re: image size? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-196278@lists.php.net to get a copy of this message | ||
Hi,
Friday, September 10, 2004, 8:59:30 AM, you wrote:
EL> Is there a way to get the size of an image created using the imagecreate
EL> function?
EL> The PHP manual section on image functions mentions getimagesize, but that
EL> only works on remote or local files.
EL> Thanks,
EL> Ed
Something like this may work if your after the output image size
<?
function jpeg_image_size($im,$quality){
ob_start();
imagejpeg($im,'',$quality);
$str = ob_get_clean();
return strlen($str);
}
--
regards,
Tom