如果您想知道这些过滤器有什么用,请查看 W3C 的规范
http://www.w3.org/TR/PNG-Filters.html
以下常量由此扩展定义,只有在将扩展编译到 PHP 中或在运行时动态加载时才可用。
GD_VERSION
(string)GD_MAJOR_VERSION
(int)GD_MINOR_VERSION
(int)GD_RELEASE_VERSION
(int)GD_EXTRA_VERSION
(string)GD_BUNDLED
(int)IMG_AVIF
(int)IMG_BMP
(int)IMG_GIF
(int)IMG_JPG
(int)IMG_JPEG
(int)注意:
此常量的值与
IMG_JPG
相同。
IMG_PNG
(int)IMG_TGA
(int)IMG_WBMP
(int)IMG_XPM
(int)IMG_WEBP
(int)IMG_WEBP_LOSSLESS
(int)IMG_COLOR_TILED
(int)IMG_COLOR_STYLED
(int)IMG_COLOR_BRUSHED
(int)IMG_COLOR_STYLEDBRUSHED
(int)IMG_COLOR_TRANSPARENT
(int)IMG_AFFINE_TRANSLATE
(int)IMG_AFFINE_SCALE
(int)IMG_AFFINE_ROTATE
(int)IMG_AFFINE_SHEAR_HORIZONTAL
(int)IMG_AFFINE_SHEAR_VERTICAL
(int)IMG_ARC_ROUNDED
(int)注意:
此常量的值与
IMG_ARC_PIE
相同。
IMG_ARC_PIE
(int)IMG_ARC_CHORD
(int)IMG_ARC_NOFILL
(int)IMG_ARC_EDGED
(int)IMG_GD2_RAW
(int)IMG_GD2_COMPRESSED
(int)IMG_EFFECT_REPLACE
(int)IMG_EFFECT_ALPHABLEND
(int)IMG_EFFECT_NORMAL
(int)IMG_EFFECT_OVERLAY
(int)IMG_EFFECT_MULTIPLY
(int)IMG_FILTER_NEGATE
(int)IMG_FILTER_GRAYSCALE
(int)IMG_FILTER_BRIGHTNESS
(int)IMG_FILTER_CONTRAST
(int)IMG_FILTER_COLORIZE
(int)IMG_FILTER_EDGEDETECT
(int)IMG_FILTER_GAUSSIAN_BLUR
(int)IMG_FILTER_SELECTIVE_BLUR
(int)IMG_FILTER_EMBOSS
(int)IMG_FILTER_MEAN_REMOVAL
(int)IMG_FILTER_SMOOTH
(int)IMG_FILTER_PIXELATE
(int)IMG_FILTER_SCATTER
(int)IMAGETYPE_GIF
(int)IMAGETYPE_JPEG
(int)IMAGETYPE_JPEG2000
(int)IMAGETYPE_PNG
(int)IMAGETYPE_SWF
(int)IMAGETYPE_PSD
(int)IMAGETYPE_BMP
(int)IMAGETYPE_WBMP
(int)IMAGETYPE_XBM
(int)IMAGETYPE_TIFF_II
(int)IMAGETYPE_TIFF_MM
(int)IMAGETYPE_IFF
(int)IMAGETYPE_JB2
(int)IMAGETYPE_JPC
(int)IMAGETYPE_JP2
(int)IMAGETYPE_JPX
(int)IMAGETYPE_SWC
(int)IMAGETYPE_ICO
(int)IMAGETYPE_WEBP
(int)IMAGETYPE_AVIF
(int)IMAGETYPE_UNKNOWN
(int)IMAGETYPE_COUNT
(int)PNG_NO_FILTER
(int)PNG_FILTER_NONE
(int)PNG_FILTER_SUB
(int)PNG_FILTER_UP
(int)PNG_FILTER_AVG
(int)PNG_FILTER_PAETH
(int)PNG_ALL_FILTERS
(int)IMG_FLIP_VERTICAL
(int)IMG_FLIP_HORIZONTAL
(int)IMG_FLIP_BOTH
(int)IMG_BELL
(int)IMG_BESSEL
(int)IMG_BILINEAR_FIXED
(int)IMG_BICUBIC
(int)IMG_BICUBIC_FIXED
(int)IMG_BLACKMAN
(int)IMG_BOX
(int)IMG_BSPLINE
(int)IMG_CATMULLROM
(int)IMG_GAUSSIAN
(int)IMG_GENERALIZED_CUBIC
(int)IMG_HERMITE
(int)IMG_HAMMING
(int)IMG_HANNING
(int)IMG_MITCHELL
(int)IMG_POWER
(int)IMG_QUADRATIC
(int)IMG_SINC
(int)IMG_NEAREST_NEIGHBOUR
(int)IMG_WEIGHTED4
(int)IMG_TRIANGLE
(int)IMG_CROP_BLACK
(int)IMG_CROP_DEFAULT
(int)IMG_CROP_TRANSPARENT
相同。 在 PHP 7.4.0 之前,捆绑的 libgd 如果图像没有透明色,则会回退到 IMG_CROP_SIDES
。
IMG_CROP_SIDES
(int)IMG_CROP_THRESHOLD
(int)threshold
和 color
裁剪图像。
IMG_CROP_TRANSPARENT
(int)IMG_CROP_WHITE
(int)如果您想知道这些过滤器有什么用,请查看 W3C 的规范
http://www.w3.org/TR/PNG-Filters.html