请下载支持gif的gd库,PHP4自带的GD库不支持gif

解决方案 »

  1.   

    我知道呀,所以我问哪里有适合这个版本的支持gif的gd库下载,谁知道的话,请给出详细的下载链接!
      

  2.   


      
    先安装 GD library,可到 http://www.boutell.com/gd 下载。在 1.6.2 版以前的 GD library 有支援 GIF 格式的功能,但因为 GIF 格式使用的 LZW 演算法牵涉到 Unisys 的专利权,因此在 GD library 1.6.2 版之后不支援 GIF 的格式。
    若真的需要使用 GD Library 中有关 GIF 的部份,不妨找较旧的 FreeBSD 或者 Linux 版本,里面可能会有这些函式,但可能会因为侵犯到 Unisys 的专利权,而引发法律问题。同时请注意旧版的 TTF 字型相关函式可能不能用。  以下是简单的例子  
       Header("Content-type: image/gif");  
    $im = imagecreate(400,30);  
    $black = ImageColorAllocate($im, 0,0,0);  
    $white = ImageColorAllocate($im, 255,255,255);  
    imageline($im, 1, 1, 350, 25, $black);  
    imagearc($im, 200, 15, 20, 20, 35, 190, $white);  
    imagestring($im, 5, 4, 10, "Graph TEST!!", $white);  
    ImageGif($im);  
    ImageDestroy($im);  
    ?>     
    GetImageSize: 取得图片的长宽。   
    ImageArc: 画弧线。   
    ImageChar: 写出横向字元。   
    ImageCharUp: 写出直式字元。   
    ImageColorAllocate: 匹配颜色。   
    ImageColorTransparent: 指定透明背景色。   
    ImageCopyResized: 复制新图并调整大小。   
    ImageCreate: 建立新图。   
    ImageDashedLine: 绘虚线。   
    ImageDestroy: 结束图形。   
    ImageFill: 图形着色。   
    ImageFilledPolygon: 多边形区域着色。   
    ImageFilledRectangle: 矩形区域着色。   
    ImageFillToBorder: 指定颜色区域内着色。   
    ImageFontHeight: 取得字型的高度。   
    ImageFontWidth: 取得字型的宽度。   
    ImageInterlace: 使用交错式显示与否。   
    ImageLine: 绘实线。   
    ImageLoadFont: 载入点阵字型。   
    ImagePolygon: 绘多边形。   
    ImageRectangle: 绘矩形。   
    ImageSetPixel: 绘点。   
    ImageString: 绘横式字串。   
    ImageStringUp: 绘直式字串。   
    ImageSX: 取得图片的宽度。   
    ImageSY: 取得图片的高度。   
    ImageTTFBBox: 计算 TTF 文字所占区域。   
    ImageTTFText: 写 TTF 文字到图中。   
    ImageColorAt: 取得图中指定点颜色的索引值。   
    ImageColorClosest: 计算色表中与指定颜色最接近者。   
    ImageColorExact: 计算色表上指定颜色索引值。   
    ImageColorResolve: 计算色表上指定或最接近颜色的索引值。   
    ImageColorSet: 设定色表上指定索引的颜色。   
    ImageColorsForIndex: 取得色表上指定索引的颜色。   
    ImageColorsTotal: 计算图的颜色数。   
    ImagePSLoadFont: 载入 PostScript 字型。   
    ImagePSFreeFont: 卸下 PostScript 字型。   
    ImagePSEncodeFont: PostScript 字型转成向量字。   
    ImagePSText: 写 PostScript 文字到图中。   
    ImagePSBBox: 计算 PostScript 文字所占区域。   
    ImageCreateFromPNG: 取出 PNG 图型。   
    ImagePNG: 建立 PNG 图型。   
    ImageCreateFromGIF: 取出 GIF 图型。   
    ImageGIF: 建立 GIF 图型。    
      

  3.   

    在这里下载:
    http://phplens.com/dl/php_gd_404.zip
      

  4.   

    <?php /* Header( "Content-type: image/jpeg");  */
    Header( "Content-type: image/gif");/* create image */
    $image = imagecreate(200,200); /* create color R=100, G=0, R=0 */
    $maroon = ImageColorAllocate($image,100,0,0); /*  create color R=255, G=255, R=255 */
    $white = ImageColorAllocate($image,255,255,255); /*  create color green */
    $green = ImageColorAllocate($image,0,100,0); /*  create white background*/
    ImageFilledRectangle($image,0,0,200,200,$white); /*  create frame*/
    ImageRectangle($image,10,10,190,190,$maroon); /*  create inner rectangle*/
    ImageFilledRectangle($image,50,70,150,150,$maroon); /* display 5 fonts */
    for ($i=1; $i <= 5; $i++)
    ImageString($image,$i,15,$i*10,'php.weblogs.com',$green);

    /*  render image */
    /* ImageJPEG($image); */
    ImageGIF($image);/*cleanup memory */
    ImageDestroy($image); 
    ?>
      

  5.   

    我这有 php_gd_gif.dll 支持Gif ,有需要的留下email
      

  6.   

    www.php4win.de这里有个非常好!比php.net的多了好多支持
      

  7.   

    要在php.ini中把php_gd.dll改为php_gd_gif.dll才行
      

  8.   

    我的Email是[email protected],谢谢你了,我想要你的php_gd_gif.dll
      

  9.   

    我也想要啊~
    [email protected]—我主要想看看是什么东东~:)
    多谢~