PHP / ImageMagic获取“阴影”一个图像 [英] PHP/ImageMagic Get the "shadow" of an image

查看:89
本文介绍了PHP / ImageMagic获取“阴影”一个图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想编写PHP / ImageMagic脚本以生成给定图像的阴影。就像在这个例子中一样(在GFXeditor中手动完成):

I would like to script PHP/ImageMagic in order to produce the "shadow" of a given image. Like in this example (done manually in GFXeditor) :

      original                shadow

alt text http: //uppix.net/d/a/f/dc82fce795fc4af20170080b09c9a.png ==> 替代文字http://uppix.net/8/9/9/b1e9df4b2858c40081771961e028d.png

注意:所有原件图片都将在示例中的白色背景上。

我查看了ImageMagic文档,但我还没有找到任何有用的东西。有谁知道它是否可以在PHP / ImageMagic中完成?如果是这样的话?

I've check the ImageMagic documentation but I haven't found anything useful yet. Does anyone know if it can be done in PHP/ImageMagic ? If so how ?

推荐答案

使用<$ h $ =>转换 -threshold 选项?

Use convert with -threshold option?

编辑:oops ...来自PHP? Imagick :: thresholdImage

oops... from PHP? Imagick::thresholdImage?

我想知道它是不是像面具而不是阴影? 在IM 的背景下, shadow 看起来像一个模糊的副本图像。

I wonder if it isn't more like a mask than a shadow? In the context of IM, shadow looks like a blurry copy of the image.

这篇关于PHP / ImageMagic获取“阴影”一个图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆