PHP浮雕彩色
我需要在 PHP 中为图像制作浮雕效果。但我需要保留真实的颜色,就像 http://loriweb.pair.com 中的地球仪图片/8udf-emboss.html
我的最终目标是做出这样的效果http://www.flickr.com/photos/52700219@N06/6729984045/在/photostream/中,我只能做到这样http://www.flickr.com/photos/52700219@N06/6759029339/为每个方块给出灰线。
到目前为止,我只发现浮雕效果会使图像颜色变成灰色,例如 当使用图像卷积或 IMG_FILTER_EMBOSS 时。 我该怎么做?
I need to make an emboss effect for an image in PHP. But I need to keep the real color, like the globe picture in http://loriweb.pair.com/8udf-emboss.html
My final target is to make effect like this http://www.flickr.com/photos/52700219@N06/6729984045/in/photostream/ and I can only make it like this http://www.flickr.com/photos/52700219@N06/6759029339/ by giving grey line for each square there.
Until now, I only find emboss effect that will make the image color become gray like
when using imageconvolution or IMG_FILTER_EMBOSS.
How can I do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您在“地球”示例中展示的浮雕效果只是一个通用的卷积核。您可以使用
imageconvolution()
实现相同的效果:The emboss effect that you showed on the "globe" example is just a generic convolution kernel. You can accomplish the same effect using
imageconvolution()
: