exif_read_data()
用这个函数对图片扫描一次

解决方案 »

  1.   

    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. 
      

  2.   

    需要安装GD库,,GD库中有函数检查图片大小的。。
       $data = GetImageSize($srcFile,&$info);
    好像是这个函数
      

  3.   

    使用getimagesize函数是不需要安装GD库的!
      

  4.   

    要GD库!
    --------------------------
    300万超炫音乐免费试听,下载
    请大家多多支持呀,
    http://www.12.com.cn
      

  5.   

    正确答案 getimagesize$imagehw     = GetImageSize($form_data);
    $imagewidth  = $imagehw[0];
    $imageheight = $imagehw[1];
      

  6.   

    imagesX() imagesY()节省一些计算时间吧?
    另外getImageSize确实不需要GD 楼上的楼上
      

  7.   

    getimagesize确实不需要GD
    文档里说得很清楚了最下面有一句话:本函数不需要 GD 图像库