phpgd:PHP的GD库函数一览



PHPGD库

GetImageSize

作用:取得图片大小[即长和宽]

使用方法:.gif' /> GetImageSize( filename, .gif' /> [imageinfo]);


ImageArc

作用:画弧线

使用方法: ImageArc( im, cx, cy, w, h, s, e, col);


ImageChar

作用:写出横向

使用方法: ImageChar( im, font, x, y, c, col);


ImageCharUp

作用:写出竖式

使用方法: ImageCharup( im, font, x, y, c, col);


ImageColorAllocate

作用:匹配颜色

使用方法: ImageColorAllocate( im, red, green, blue);


ImageColorTransparent

作用:指定透明背景色

使用方法: ImageColorTransparent( im, [col]);


ImageCopyResized

作用:复制新图并调整大小

使用方法: ImageCopyResized( dst_im, src_im, dstX, dstY, srcX, srcY, dstW, d** srcW, srcH);


ImageCreate

作用:建立新图

使用方法: ImageCreate( x_size, y_size);


ImageDashedLine

作用:绘虚线

使用方法: ImageDashedLine( im, x1, y1, x2, y2, col);


ImageDestroy

作用:结束图形

使用方法解释: ImageDestroy( im);


ImageFill

作用:图形着色

使用方法: ImageFill( im, x, y, col);


ImageFilledPolygon

作用:多边形区域着色

使用方法: ImageFilledPolygon( im, .gif' /> pos, num_pos, col);


ImageFilledRectangle

作用:矩形区域着色

使用方法: ImageFilledRectangle( im, x1, y1, x2, y2, col);


ImageFillToBorder

作用:指定颜色区域内着色

使用方法: ImageFillToBorder( im, x, y, border, col);


ImageFontHeight

作用:取得字型高度

使用方法: ImageFontHeight( font);


ImageFontWidth

作用:取得字型宽度

使用方法: ImageFontWidth( font);


ImageInterlace

作用:使用交错式显示和否

使用方法: ImageInterlace( im, [erlace]);


ImageLine

作用:绘实线

使用方法: ImageLine( im, x1, y1, x2, y2, col);


ImageLoadFont

作用:载入点阵字型

使用方法: ImageLoadFont( file);


ImagePolygon

作用:绘多边形

使用方法: ImagePolygon( im, .gif' /> pos, num_pos, col);


ImageRectangle

作用:绘矩形

使用方法: ImageRectangle( im, x1, y1, x2, y2, col);


ImageSetPixel

作用:绘点

使用方法: ImageSetPixel( im, x, y, col);


ImageString

作用:绘横式

使用方法: ImageString( im, font, x, y, s, col);


ImageStringUp

作用:绘直式

使用方法: ImageStringUp( im, font, x, y, s, col);


ImageSX

作用:取得图片宽度

使用方法: ImageSX( im);


ImageSY

作用:取得图片高度

使用方法: ImageSY( im);


ImageTTFBBox

作用:计算 TTF 文字所占区域

使用方法:.gif' /> ImageTTFBBox( size, angle, fontfile, text);


ImageTTFText[Page]

作用:写 TTF 文字到图中

使用方法:.gif' /> ImageTTFText( im, size, angle, x, y, col, fontfile, text);


ImageColorAt

作用:取得图中指定点颜色索引值

使用方法: ImageColorAt( im, x, y);


ImageColorClosest

作用:计算色表中和指定颜色最接近者

使用方法: ImageColorClosest( im, red, green, blue);


ImageColorExact

作用:计算色表上指定颜色索引值

使用方法: ImageColorExact( im, red, green, blue);


ImageColorResolve

作用:计算色表上指定或最接近颜色索引值

使用方法: ImageColorResolve( im, red, green, blue);


ImageColorSet

作用:设定色表上指定索引颜色

使用方法:boolean ImageColorSet( im, index, red, green, blue);


ImageColorsForIndex

作用:取得色表上指定索引颜色

使用方法:.gif' /> ImageColorsForIndex( im, index);


ImageColorsTotal

作用:计算图颜色数

使用方法: ImageColorsTotal( im);


ImagePSLoadFont

作用:载入 Posts.c.r.i.p.t 字型

使用方法: ImagePSLoadFont( filename);


ImagePSFreeFont

作用:卸下 Posts.c.r.i.p.t 字型

使用方法:void ImagePSFreeFont( fontindex);


ImagePSEncodeFont

作用:Posts.c.r.i.p.t 字型转成向量字

使用方法: ImagePSEncodeFont( encodingfile);


ImagePSText

作用:写 Posts.c.r.i.p.t 文字到图中

使用方法:.gif' /> ImagePSText( image, text, font, size, foreground, background, x, y, space, tightness, float angle, antialias_steps);


ImagePSBBox

作用:计算 Posts.c.r.i.p.t 文字所占区域

使用方法: .gif' /> ImagePSBBox( text, font, size, space, width, float angle);




ImageCreateFromPNG

作用:取出 PNG 图型

使用方法: ImageCreateFromPng( filename);


ImagePNG

作用:建立 PNG 图型

使用方法: ImagePng( im, [filename]);


ImageCreateFromGIF

作用:取出 GIF 图型

使用方法: ImageCreateFromG( filename);


ImageGIF

作用:建立 GIF 图型

使用方法: ImageG( im, [filename]);
Tags:  php5gd库 php5gd phpgd库 phpgd

延伸阅读

最新评论

发表评论