【问题标题】:How can I add a filter to image (blur) [duplicate]如何向图像添加滤镜(模糊)[重复]
【发布时间】:2016-04-26 05:10:00
【问题描述】:

我有一个场景。随着循环的进行,我想模糊我的图像。我怎样才能做到这一点?这是我的代码。

<!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>

【问题讨论】:

标签: javascript php jquery


【解决方案1】:

您可能必须使用 PHP 的“imagemagick”。其中有很多图像处理方法。您可以使用以下方法为您的图像,

Imagick::blurImage

详细文档请参考以下链接。

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-11-05
    • 2021-09-04
    • 2012-12-01
    • 2014-02-06
    • 1970-01-01
    • 2013-01-10
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多