I'm trying to blur first image like third one,But I cant do it ! :(
header('Content-Type: image/jpeg');
$image = imagecreatefromjpeg('1.jpg');
for ($x=1; $x<=40; $x++){
imagefilter($image, IMG_FILTER_GAUSSIAN_BLUR,999);
}
imagefilter($image, IMG_FILTER_SMOOTH,99);
imagefilter($image, IMG_FILTER_BRIGHTNESS, 10);
imagejpeg($image);
imagedestroy($image);
Try to scale down the image and apply the loop with gaussian blur on the resized image. That way you will save some performance on large images:
I have borrowed the downsizing idea and some of the code form this answer
I have tested the solution with your image, and the result:
You can elaborate and increase/decrease the blur by changing the number of loops for the small image. If you change
for ($x=1; $x <=40; $x++){
tofor ($x=1; $x <=75; $x++){
you will get more blur.The downside to this solution is that you will get som visible pixelation because of the resizing going on. The upside is better performance, less server load and execution time compared to if you would apply the blur loop on the original sized image.
i also faced this problem in my project that time i use some long code but i think that, that code is not proper and create my own small code, here is that code