程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 網頁編程 >> PHP編程 >> 關於PHP編程 >> 概覽PHP GD庫函數

概覽PHP GD庫函數

編輯:關於PHP編程

我們在使用

GetImageSize
作用:取得圖片的大小[即長與寬]
PHP GD庫函用法:array GetImageSize(string filename, array [imageinfo]);

ImageArc
作用:畫弧線
用法:int ImageArc(int im, int cx, int cy, int w, int h, int s, int e, int col);

ImageChar
作用:寫出橫向字符
PHP GD庫函用法:int ImageChar(int im, int font, int x, int y, string c, int col);

ImageCharUp
作用:寫出豎式字符
用法:int ImageCharup(int im, int font, int x, int y, string c, int col);

ImageColorAllocate
作用:匹配顏色
PHP GD庫函用法:int ImageColorAllocate(int im, int red, int green, int blue);

ImageColorTransparent
作用:指定透明背景色
用法:int ImageColorTransparent(int im, int [col]);

ImageCopyResized
作用:復制新圖並調整大小
PHP GD庫函用法:int ImageCopyResized(int dst_im, int src_im, int dstX, int dstY, int srcX, int srcY, int dstW, int dstH, int srcW, int srcH);

ImageCreate
作用:建立新圖
用法:int ImageCreate(int x_size, int y_size);

ImageDashedLine
作用:繪虛線
用法:int ImageDashedLine(int im, int x1, int y1, int x2, int y2, int col);

ImageDestroy
PHP GD庫函作用:結束圖形
用法解釋:int ImageDestroy(int im);

ImageFill
作用:圖形著色
用法:int ImageFill(int im, int x, int y, int col);

ImageFilledPolygon
作用:多邊形區域著色
PHP GD庫函用法:int ImageFilledPolygon(int im, array points, int num_points, int col);

ImageFilledRectangle
作用:矩形區域著色
用法:int ImageFilledRectangle(int im, int x1, int y1, int x2, int y2, int col);

ImageFillToBorder
作用:指定顏色區域內著色
PHP GD庫函用法:int ImageFillToBorder(int im, int x, int y, int border, int col);

ImageFontHeight
作用:取得字型的高度
用法:int ImageFontHeight(int font);

ImageFontWidth
作用:取得字型的寬度
用法:int ImageFontWidth(int font);

ImageInterlace
作用:使用交錯式顯示與否
PHP GD庫函用法:int ImageInterlace(int im, int [interlace]);

ImageLine
作用:繪實線
用法:int ImageLine(int im, int x1, int y1, int x2, int y2, int col);

ImageLoadFont
作用:載入點陣字型
用法:int ImageLoadFont(string file);

ImagePolygon
作用:繪多邊形
用法:int ImagePolygon(int im, array points, int num_points, int col);

ImageRectangle
作用:繪矩形
用法:int ImageRectangle(int im, int x1, int y1, int x2, int y2, int col);

ImageSetPixel
作用:繪點
PHP GD庫函用法:int ImageSetPixel(int im, int x, int y, int col);

ImageString
作用:繪橫式字符串
用法:int ImageString(int im, int font, int x, int y, string s, int col);

ImageStringUp
作用:繪直式字符串
用法:int ImageStringUp(int im, int font, int x, int y, string s, int col);

ImageSX
作用:取得圖片的寬度
用法:int ImageSX(int im);

ImageSY
作用:取得圖片的高度
PHP GD庫函用法:int ImageSY(int im);

ImageTTFBBox
作用:計算 TTF 文字所占區域
用法:array ImageTTFBBox(int size, int angle, string fontfile, string text);

ImageTTFText
作用:寫 TTF 文字到圖中
用法:array ImageTTFText(int im, int size, int angle, int x, int y, int col, string fontfile, string text);

ImageColorAt
作用:取得圖中指定點顏色的索引值
用法:int ImageColorAt(int im, int x, int y);

ImageColorClosest
作用:計算色表中與指定顏色最接近者
PHP GD庫函用法:int ImageColorClosest(int im, int red, int green, int blue);

ImageColorExact
作用:計算色表上指定顏色索引值
用法:int ImageColorExact(int im, int red, int green, int blue);

ImageColorResolve
作用:計算色表上指定或最接近顏色的索引值
用法:int ImageColorResolve(int im, int red, int green, int blue);

ImageColorSet
作用:設定色表上指定索引的顏色
用法:boolean ImageColorSet(int im, int index, int red, int green, int blue);

ImageColorsForIndex
作用:取得色表上指定索引的顏色
PHP GD庫函用法:array ImageColorsForIndex(int im, int index);

ImageColorsTotal
作用:計算圖的顏色數
用法:int ImageColorsTotal(int im);

ImagePSLoadFont
作用:載入 PostScript 字型
用法:int ImagePSLoadFont(string filename);

ImagePSFreeFont
作用:卸下 PostScript 字型
用法:void ImagePSFreeFont(int fontindex);

ImagePSEncodeFont
作用:PostScript 字型轉成向量字
PHP GD庫函用法:int ImagePSEncodeFont(string encodingfile);

ImagePSText
作用:寫 PostScript 文字到圖中
用法:array ImagePSText(int image, string text, int font, int size, int foreground, int background, int x, int y, int space, int tightness, float angle, int antialias_steps);

ImagePSBBox
作用:計算 PostScript 文字所占區域
PHP GD庫函用法: array ImagePSBBox(string text, int font, int size, int space, int width, float angle);

ImageCreateFromPNG
作用:取出 PNG 圖型
用法:int ImageCreateFromPng(string filename);

ImagePNG
作用:建立 PNG 圖型
用法:int ImagePng(int im, string [filename]);

ImageCreateFromGIF
作用:取出 GIF 圖型
用法:int ImageCreateFromGif(string filename);

ImageGIF
作用:建立 GIF 圖型
PHP GD庫函用法:int ImageGif(int im, string [filename]);


  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved