YouTip LogoYouTip

Php Image Gd

# PHP Image Processing PHP provides a rich set of image processing functions, mainly including: | Function | Description | | --- | --- | | [gd_info()](#) | Gets information about the currently installed GD library | | [getimagesize()](#) | Gets image information | | [getimagesizefromstring()](#) | Gets image information from a string | | [image_type_to_extension()](#) | Gets the image file extension | | [image_type_to_mime_type()](#) | Returns the MIME type of the image | | [image2wbmp()](#) | Outputs a WBMP image | | [imageaffine()](#) | Returns an image after an affine transformation | | [imageaffinematrixconcat()](#) | Concatenates two matrices | | [imageaffinematrixget()](#) | Gets a matrix | | [imagealphablending()](#) | Sets the blending mode for the image | | [imageantialias()](#) | Sets or checks if antialiasing is used | | [imagearc()](#) | Draws an elliptical arc | | [imagechar()](#) | Draws a character horizontally | | [imagecharup()](#) | Draws a character vertically | | [imagecolorallocate()](#) | Allocates a color for an image | | [imagecolorallocatealpha()](#) | Allocates a color with transparency for an image | | [imagecolorat()](#) | Gets the color index of a pixel | | [imagecolorclosest()](#) | Gets the index of the closest color to the specified color | | [imagecolorclosestalpha()](#) | Gets the index of the closest color with alpha to the specified color | | [imagecolorclosesthwb()](#) | Gets the index of the closest hue, white, and black to the specified color | | [imagesx() and imagesy()](#) | Gets the width and height of the image | ## GD Library To use PHP image processing functions, you need to load the GD support library. Please ensure that php.ini has loaded the GD library: On Windows servers: ```ini extension = php_gd2.dll On Linux and Mac systems: ```ini extension = php_gd2.so You can use the `gd_info()` function to view information about the currently installed GD library: ```php The output is roughly as follows: array(12) { => string(26) "bundled (2.1.0 compatible)" => bool(true) => string(13) "with freetype" => bool(false) ["GIF
← Css Rwd ImagesCss Rwd Grid β†’