概覽PHP GD庫函數_PHP教程

來源:互聯網
上載者:User
我們在使用

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]);


http://www.bkjia.com/PHPjc/446047.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/446047.htmlTechArticle我們在使用 GetImageSize 作用:取得圖片的大小[即長與寬] PHP GD庫函用法:array GetImageSize(string filename, array [imageinfo]); ImageArc 作用:畫弧線 用...

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.