1. BOOL Function_exists (string $function _name)
Find function_name in the list of functions already defined, including the system's own functions and user-defined functions.
- Returns: Returns True if a function has already been defined
- Returns false for queries of the syntax structure
2.bool ImageFilter (Resource srCim, I N T FilterType [, int arg1[,in t arg2 [, int $arg 3]]]) use filters on images php5,7
ImageFilter () applies the filter FilterType to the image and uses ARG1,ARG2 and arg3 when needed.
This function is only available in PHP versions that are bundled with the GD library.
$im = imagecreatefrompng('dave.png');if ($im && imagefilter($im, IMG_FILTER_GRAYSCALE)) { echo'图片转化为灰度成功'; imagepng($im, 'dave.png');} else { echo'图片转化为灰度失败';}imagedestroy($im);?>
- If the format of the Imagecreatefrompng () function and the actual picture does not match when the original format does not match, this is not the changed extension
- If you do not match the error prompt: gd-jpeg:jpeg Library reports unrecoverable error
- Query the information of an image getimagesize ()
3.array getimagesize (String $filename)
* * This function contains an optional parameter because it is not used so it ignores the official information
The getimagesize () function will determine any GIF,JPG,PNG,SWF,SWC,PSD,TIFF,BMP,IFF,JP2,JPX,JB2,JPC,XBM or WBMP The size of the image file and returns the size of the image as well as the file type and a height/width text string that can be used in an IMG tag in an ordinary HTML file.
print_r(getimagesize("web.jpg"));/*输出:Array( [0] => 568 图像宽度的像素值 [1] => 2628 图像高度的像素值 [2] => 1 图像类型 [3] => width="568" height="2628" 图片长宽字符串 [bits] => 8 每种颜色的位数 [channels] => 3 对于 RGB 图像其值为 3,对于 CMYK 图像其值为 4 [mime] => image/gif 该图像的 MIME 类型)*/
tag of the image type: 1 = gif,2 = jpg,3 = png,4 = swf,5 = psd,6 = bmp,7 = TIFF (Intel byte order), 8 = TIFF (Motorola byte order), 9 = jpc,1 0 = jp2,11 = jpx,12 = jb2,13 = swc,14 = iff,15 = wbmp,16 = XBM.
4.resource imagecreatefromgd2 (string $filename) Create a new image from a GD2 file or URL
Problem left
IMAGECREATEFROMGD2 ()
If the fopen wrapper is enabled, in this function, the URL can be used as the file name. For more information on how to specify filenames see fopen (). Different features of various wapper see supported protocols and encapsulation protocols, and note their usage and the predefined variables available.
- URL meaning is not can choose a non-GD2 format picture, but I tried not
'). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('
'). Text (i)); }; $numbering. FadeIn (1700); }); });
The above on the introduction of PHP learning, 2016-5-10, including PHP learning, 2016 aspects of the content, I hope that the PHP tutorial interested in a friend helpful.