Overview PHPGD library function _ PHP Tutorial-php Tutorial

Source: Internet
Author: User
Overview of PHPGD library functions. GetImageSize is used to obtain the image size [I .e., length and width] PHPGD library function usage: arrayGetImageSize (stringfilename, array [imageinfo]); ImageArc function: draw an arc in use

GetImageSize
Purpose: obtain the image size [that is, the length and width].
Php gd library function usage: array GetImageSize (string filename, array [imageinfo]);

ImageArc
Purpose: draw an arc
Usage: int ImageArc (int im, int cx, int cy, int w, int h, int s, int e, int col );

ImageChar
Role: write horizontal characters
Php gd library function usage: int ImageChar (int im, int font, int x, int y, string c, int col );

ImageCharUp
Purpose: write vertical characters
Usage: int ImageCharup (int im, int font, int x, int y, string c, int col );

ImageColorAllocate
Purpose: match the color
Php gd library function usage: int ImageColorAllocate (int im, int red, int green, int blue );

ImageColorTransparent
Purpose: specify the transparent background color.
Usage: int ImageColorTransparent (int im, int [col]);

ImageCopyResized
Purpose: copy a new image and resize it.
Php gd library function usage: int ImageCopyResized (int dst_im, int src_im, int dstX, int dstY, int srcX, int srcY, int dstW, int dsomething, int srcW, int srcH );

ImageCreate
Purpose: create a new graph.
Usage: int ImageCreate (int x_size, int y_size );

ImageDashedLine
Purpose: draw dotted lines.
Usage: int ImageDashedLine (int im, int x1, int y1, int x2, int y2, int col );

ImageDestroy
Function of php gd Library: end graph
Description: int ImageDestroy (int im );

ImageFill
Role: graphic coloring
Usage: int ImageFill (int im, int x, int y, int col );

ImageFilledPolygon
Purpose: Polygon area coloring
Php gd library function usage: int ImageFilledPolygon (int im, array points, int num_points, int col );

ImageFilledRectangle
Purpose: color the rectangle area.
Usage: int ImageFilledRectangle (int im, int x1, int y1, int x2, int y2, int col );

ImageFillToBorder
Purpose: color the color area.
Php gd library function usage: int ImageFillToBorder (int im, int x, int y, int border, int col );

ImageFontHeight
Purpose: Get the font height
Usage: int ImageFontHeight (int font );

ImageFontWidth
Purpose: obtain the font width.
Usage: int ImageFontWidth (int font );

ImageInterlace
Purpose: use staggered display or not
Php gd library function usage: int ImageInterlace (int im, int [interlace]);

ImageLine
Purpose: draw a solid line
Usage: int ImageLine (int im, int x1, int y1, int x2, int y2, int col );

ImageLoadFont
Purpose: load the dot matrix font
Usage: int ImageLoadFont (string file );

ImagePolygon
Purpose: draw a polygon.
Usage: int ImagePolygon (int im, array points, int num_points, int col );

ImageRectangle
Purpose: draw a rectangle.
Usage: int ImageRectangle (int im, int x1, int y1, int x2, int y2, int col );

ImageSetPixel
Purpose: Draw points
Php gd library function usage: int ImageSetPixel (int im, int x, int y, int col );

ImageString
Purpose: draw a horizontal string.
Usage: int ImageString (int im, int font, int x, int y, string s, int col );

ImageStringUp
Purpose: print a straight string
Usage: int ImageStringUp (int im, int font, int x, int y, string s, int col );

ImageSX
Purpose: obtain the image width.
Usage: int ImageSX (int im );

ImageSY
Purpose: get the image height
Php gd library function usage: int ImageSY (int im );

ImageTTFBBox
Purpose: calculate the area occupied by TTF text
Usage: array ImageTTFBBox (int size, int angle, string fontfile, string text );

ImageTTFText
Purpose: write TTF text to the graph.
Usage: array ImageTTFText (int im, int size, int angle, int x, int y, int col, string fontfile, string text );

ImageColorAt
Purpose: obtain the index value of the specified color in the graph.
Usage: int ImageColorAt (int im, int x, int y );

ImageColorClosest
Purpose: calculate the nearest person to a specified color.
Php gd library function usage: int ImageColorClosest (int im, int red, int green, int blue );

ImageColorExact
Purpose: calculate the color index value specified in the color table.
Usage: int ImageColorExact (int im, int red, int green, int blue );

ImageColorResolve
Purpose: calculate the index value of the specified or nearest color on the color table.
Usage: int ImageColorResolve (int im, int red, int green, int blue );

ImageColorSet
Purpose: set the color of the specified index on the color table.
Usage: boolean ImageColorSet (int im, int index, int red, int green, int blue );

ImageColorsForIndex
Purpose: obtain the color of the specified index on the color table.
Php gd library function usage: array ImageColorsForIndex (int im, int index );

ImageColorsTotal
Purpose: calculate the number of colors of a graph.
Usage: int ImageColorsTotal (int im );

ImagePSLoadFont
Purpose: load the PostScript font
Usage: int ImagePSLoadFont (string filename );

ImagePSFreeFont
Purpose: remove the PostScript font
Usage: void ImagePSFreeFont (int fontindex );

ImagePSEncodeFont
Role: convert a PostScript to a vector word
Php gd library function usage: int ImagePSEncodeFont (string encodingfile );

ImagePSText
Purpose: write PostScript text to the graph.
Usage: 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
Role: calculate the area occupied by PostScript text
Php gd library function usage: array ImagePSBBox (string text, int font, int size, int space, int width, float angle );

ImageCreateFromPNG
Purpose: retrieve the PNG image
Usage: int ImageCreateFromPng (string filename );

ImagePNG
Purpose: Create a PNG image
Usage: int ImagePng (int im, string [filename]);

ImageCreateFromGIF
Purpose: retrieve the GIF image
Usage: int ImageCreateFromGif (string filename );

ImageGIF
Purpose: create a GIF image
Php gd library function usage: int ImageGif (int im, string [filename]);


GetImageSize function: obtains the image size [that is, the length and width] php gd library function usage: array GetImageSize (string filename, array [imageinfo]); ImageArc function: draw an arc...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.