【发布时间】:2018-07-05 11:25:01
【问题描述】:
我想使用 imageCreateFromBMP($src) 而不是 $src 从返回图像中知道图像的图像宽度和高度。我怎样才能做到这一点?
$src = 'four.bmp'; //src of image
$im = imagecreatefrombmp($src);
list($width, $height) = GetImageSize($im); // it doesnot work though it takes string
echo 'Image width '.$width.'</br>';
echo 'Image height '.$height.'</br>';
【问题讨论】:
-
imagesx()和imagesy()获取图片资源 -
谢谢你!写下答案..我会接受你的答案:)