“软焦点” PHP中的效果
我正在寻找使用 php 和 GD 实现“软焦点”效果的
更多信息:http://www.nickgallery.com/web_pages/technical%208.htm
photoshop 教程:http://www.makeuseof.com/tag/create-awesome-soft-focus-effect-photoshop- 2/
我试图做类似的事情:
<?php
$image = imagecreatefromjpeg("image.jpg");
imagefilter($image, IMG_FILTER_GAUSSIAN_BLUR);
header("content-type: image/jpeg");
imagejpeg($image);
imagedestroy($image);
?>
I was looking for an implementation of "soft focus" effect with php and GD
More info here: http://www.nickgallery.com/web_pages/technical%208.htm
Tutorial in photoshop: http://www.makeuseof.com/tag/create-awesome-soft-focus-effect-photoshop-2/
I was trying to do with something like that:
<?php
$image = imagecreatefromjpeg("image.jpg");
imagefilter($image, IMG_FILTER_GAUSSIAN_BLUR);
header("content-type: image/jpeg");
imagejpeg($image);
imagedestroy($image);
?>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
查看 phpThumb - 它在库中内置了很多很棒的过滤器/选项,可以帮助您获得这种排序结果。
这是演示页面,您可以在其中看到其中一些的实际效果。
Check out phpThumb - it has a lot of great filters/options built into the library that might help you get this sort of result.
Here's the demo page where you can see some of them in action.
您很可能会使用 Gimp 并编写脚本来实现这一目标,否则您会考虑做一个使用 GD 进行大量的每像素操作,这在 PHP 中将是一个缓慢的操作>
You'd most likely have better luck using Gimp and scripting it to achieve this, otherwise you're looking at doing a LOT of per-pixel manipulation with GD, which is going to be a slow operation in PHP>