PHP Function Imagefilter
php function imagefilter is an action function that passes any arguments you provide to it through an array. This is super useful if you’re building a shortcode with lots of variables that need to be filtered, like strings or integers. Just passing them through this filter function will make them an array so other action functions can hook into it and modify those values, too.
The argument list for this function varies depending on the filter effect you select. For example, IMG_FILTER_EDGEDETECT will highlight the edges of an image with a dark border, while IMG_FILTER_GAUSSIAN_BLUR will blur an image using a Gaussian algorithm. IMG_FILTER_MEAN_REMOVAL will do the same thing but with an asymmetric blur that gives a sketchy look to images.
In addition to this, there’s also IMG_FILTER_PIXELATE, which applies an advanced pixelation effect to images. It uses a 9-cell convolution matrix with pixels having a weight based on their color, where the center pixel is the weight of 1.0 and other pixels have a weight of 0.0.
Another neat thing is IMG_FILTER_COLORIZE, which lets you use an alpha channel to create a transparent version of the image. This can be a great way to prevent bots from reading your CAPTCHA code, since it will appear as black text to them.