0

I have a scenario. I want to blur my image as the loop advances. How can I achieve that? This is my code.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Test Pagw</title>
</head>

<body>

<?php for($i=1; $i<=5; $i++){
/*
 * if $i=1, image will be clear
 * if $i=2, image will be less clear
 * if $i=3, image will be even clear
 * if $i=4, image will be very partially clear
 * if $i=5, image will be totally blurred
 */ 
?>
<img src="flower.jpg" />
<?php } ?>
</body>
</html>
Ali Zia
  • 3,825
  • 5
  • 29
  • 77

1 Answers1

1

You may have to work with the "imagemagick" of the PHP. There are lot of Image processing methods in it. You can use it following method for your image,

Imagick::blurImage

for detailed document please refer the following link.

http://php.net/manual/en/book.imagick.php

Keyur Mistry
  • 926
  • 6
  • 18