getimagesize (PHP 3, PHP 4 )getimagesize -- Get the size of an image Description array getimagesize ( string filename [, array imageinfo]) The getimagesize() function will determine the size of any GIF, JPG, PNG, SWF, SWC, PSD, TIFF, BMP, IFF, JP2 or JPC image file and return the dimensions along with the file type and a height/width text string to be used inside a normal HTML IMG tag. Returns an array with 4 elements. Index 0 contains the width of the image in pixels. Index 1 contains the height. Index 2 is a flag indicating the type of the image: 1 = GIF, 2 = JPG, 3 = PNG, 4 = SWF, 5 = PSD, 6 = BMP, 7 = TIFF(intel byte order), 8 = TIFF(motorola byte order), 9 = JPC, 10 = JP2, 11 = JPX, 12 = JB2, 13 = SWC, 14 = IFF. These values correspond to the IMAGETYPE constants that were added in PHP 4.3. Index 3 is a text string with the correct height="yyy" width="xxx" string that can be used directly in an IMG tag.
(PHP 3, PHP 4 )getimagesize -- Get the size of an image
Description
array getimagesize ( string filename [, array imageinfo])
The getimagesize() function will determine the size of any GIF, JPG, PNG, SWF, SWC, PSD, TIFF, BMP, IFF, JP2 or JPC image file and return the dimensions along with the file type and a height/width text string to be used inside a normal HTML IMG tag. Returns an array with 4 elements. Index 0 contains the width of the image in pixels. Index 1 contains the height. Index 2 is a flag indicating the type of the image: 1 = GIF, 2 = JPG, 3 = PNG, 4 = SWF, 5 = PSD, 6 = BMP, 7 = TIFF(intel byte order), 8 = TIFF(motorola byte order), 9 = JPC, 10 = JP2, 11 = JPX, 12 = JB2, 13 = SWC, 14 = IFF. These values correspond to the IMAGETYPE constants that were added in PHP 4.3. Index 3 is a text string with the correct height="yyy" width="xxx" string that can be used directly in an IMG tag.
$data = GetImageSize($srcFile,&$info);
好像是这个函数
--------------------------
300万超炫音乐免费试听,下载
请大家多多支持呀,
http://www.12.com.cn
$imagewidth = $imagehw[0];
$imageheight = $imagehw[1];
另外getImageSize确实不需要GD 楼上的楼上
文档里说得很清楚了最下面有一句话:本函数不需要 GD 图像库