PHP's GD library functions Daquan

Source: Internet
Author: User

GetImageSize
Effect: Gets the size of the image [i.e. length and width] Usage: array getimagesize (string filename, array [imageinfo]);

Imagearc
Function: Draw arc usage: int imagearc (int im, int cx, int cy, int w, int h, int s, int e, int col);

Imagechar
Function: Write out horizontal character usage: int Imagechar (int im, int font, int x, int y, string c, int col);

Imagecharup
Function: Write down the vertical character usage: int Imagecharup (int im, int font, int x, int y, string c, int col);

Imagecolorallocate
Function: Match color usage: int imagecolorallocate (int im, int red, int green, int blue);

Imagecolortransparent
Function: Specify transparent background color usage: int imagecolortransparent (int im, int [col]);

Imagecopyresized
Function: Copy new diagram and resize usage: int imagecopyresized (int dst_im, int src_im, int dstX, int dsty, int srcx, int srcy, int dstw, int dsth, I NT SRCW, int srcH);

Imagecreate
Function: Create a new diagram usage: int imagecreate (int x_size, int y_size);

Imagedashedline
Function: Draw dash usage: int imagedashedline (int im, int x1, int y1, int x2, int y2, int col);
Imagedestroy Effect: End graphics usage Explanation: int Imagedestroy (int im);

Imagefill
Function: Graphical coloring usage: int imagefill (int im, int x, int y, int col);

Imagefilledpolygon Effect: Polygon Area Shading Usage: int imagefilledpolygon (int im, array points, int num_points, int col);

Imagefilledrectangle Effect: Rectangle area Shading Usage: int imagefilledrectangle (int im, int x1, int y1, int x2, int y2, int col);

Imagefilltoborder effect: Specifies the color area within the shading usage: int imagefilltoborder (int im, int x, int y, int border, int col);

Imagefontheight
Function: Obtain the height of the font usage: int imagefontheight (int font);

Imagefontwidth Effect: Obtain the width of the font usage: int imagefontwidth (int font);

Imageinterlace function: Use interleaved display or not usage: int imageinterlace (int im, int [interlace]);

Imageline Effects: Paint solid line usage: int imageline (int im, int x1, int y1, int x2, int y2, int col);

Imageloadfont effect: Load lattice font usage: int imageloadfont (string file);

Imagepolygon effect: Draw polygon Usage: int imagepolygon (int im, array points, int num_points, int col);

Imagerectangle effects: Draw rectangle Usage: int imagerectangle (int im, int x1, int y1, int x2, int y2, int col);

Imagesetpixel effects: Plot point usage: int imagesetpixel (int im, int x, int y, int col); Imagestring Effect: Painted horizontal string usage: int imagestring (int im, int font, int x, int y, string s, int col);

Imagestringup effects: Draw straight string usages: int Imagestringup (int im, int font, int x, int y, string s, int col);

Imagesx
Effect: Obtain the width of the image usage: int imagesx (int im);

Imagesy
Effect: Obtain the height of the image usage: int imagesy (int im);

Imagettfbbox
Function: Calculate the area usage of TTF literals: array imagettfbbox (int size, int angle, string fontfile, string text);

Imagettftext Effect: Write TTF text to diagram usage: array imagettftext (int im, int size, int angle, int x, int y, int col, string fontfile, str ing text); Imagecolorat effect: Gets the index value usage of the specified point color in the graph: int imagecolorat (int im, int x, int y);

Imagecolorclosest
Function: Calculates the closest usage in a color table to a specified color: int imagecolorclosest (int im, int red, int green, int blue);

Imagecolorexact
Function: Calculate the specified color index value on the color table usage: int imagecolorexact (int im, int red, int green, int blue);

Imagecolorresolve
Function: Calculates the index value usage of the specified or closest color on the color table: int imagecolorresolve (int im, int red, int green, int blue);

Imagecolorset
Function: Sets the color usage of the specified index on the color table: boolean imagecolorset (int im, int index, int red, int green, int blue); Imagecolorsforindex effect: Gets the color usage of the specified index on the color table: array imagecolorsforindex (int im, int index);

Imagecolorstotal
function: Calculate the color number of the graph usage: int imagecolorstotal (int im); Imagepsloadfont effect: Loading PostScript font usage: int imagepsloadfont (string filename);

Imagepsfreefont
Function: Remove PostScript font usage: void imagepsfreefont (int fontindex);

Imagepsencodefont
function: The PostScript font turns into vector word usage: int imagepsencodefont (string encodingfile);

Imagepstext function: Write PostScript text to diagram usage: array imagepstext (int image, string text, int font, int size, int foreground, int bac kground, int x, int y, int space, int tightness, float angle, int antialias_steps);

Imagepsbbox effect: Calculate PostScript Text occupied area usage: array imagepsbbox (string text, int font, int size, int space, int width, float ang Le);

Imagecreatefrompng Effect: Remove PNG pattern usage: int imagecreatefrompng (string filename);

Imagepng Effect: Establish PNG pattern usage: int imagepng (int im, string [filename]);

Imagecreatefromgif Effect: Remove GIF pattern usage: int imagecreatefromgif (string filename);

Imagegif effect: Create GIF pattern usage: int imagegif (int im, string [filename]);

PHP's GD library functions Daquan

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.