I need to obfuscate a certain area of an image using PHP and GD, currently I'm using the following code:
for ($x = $_GET['x1']; $x < $_GET['x2']; $x += $pixel)
{
for ($y = $_GET['y1']; $y < $_GET['y2']; $y += $pixel)
{
ImageFilledRectangle($image, $x, $y, $x + $pixel - 1, $y + $pixel - 1, ImageColorAt($image, $x, $y));
}
}
This basically replaces the selected area with squares of $pixel pixels. I want to accomplish some kind of blur (gaussian preferably) effect, I know I can use the ImageFilter() function:
ImageFilter($image, IMG_FILTER_GAUSSIAN_BLUR);
But it blurs the entire canvas, my problem is that I just want to blur a specific area.