是否可以对同一张图像使用两次evaluateImage?
我们正在创建一个工具来从多个图像构建图像,如下所示:https://www. kalaharikats.com/custom-kat 我们试图通过使用评估图像作为整数来改变标记的边缘,这是我们在构建标记的不透明部分时偶然实现的效果。我现在想知道的是是否可以在同一张图像上使用 Imagick 库中的valuateImage两次?任何帮助将不胜感激。
编辑:此时,代码运行评估图像()一次用于不透明度,一次用于边缘。边缘是脚本中最麻烦的部分。两者都使用 Imagick::EVALUATE_MULTIPLY,不透明度使用 0.01-1 范围,另一个使用 1 到 100。如果有必要,我可以包含有问题的代码和屏幕截图,但觉得方便使用实时工具可能会更好。
编辑2:我已经包含了有问题的代码部分。 :-)
$image->evaluateImage(Imagick::EVALUATE_MULTIPLY, $marking->get('opacity') * 0.01, Imagick::CHANNEL_ALPHA);
$image->evaluateImage(Imagick::EVALUATE_MULTIPLY, $marking->get('edging'), Imagick::CHANNEL_ALPHA);
$image->setImageAlphaChannel(Imagick::ALPHACHANNEL_EXTRACT);
编辑 3:我们有一些可能有帮助的屏幕截图。请在此处下载;我们必须制作一个 zip 文件,因为它们太大,无法附加到这个问题。 :-)
We are creating a tool to build an image out of several images, as seen here: https://www.kalaharikats.com/custom-kat We are attempting to change the edges of a marking by using evaluate image as a whole number, an effect that we achieved quite by accident when building the opacity portion of markings. What I am wondering at this point is if it is possible to use evaluateImage in the Imagick library twice on the same image? Any help would be greatly appreciated.
Edit: At this time, the code runs evaluateImage() once for opacity and once for edging. Edging is our troublesome portion of the script. Both use Imagick::EVALUATE_MULTIPLY, with opacity using a 0.01-1 range and the other using 1 to 100. I can, if necessary, include the code in question and screenshots, but felt that having the live tool handy might serve better.
Edit 2: I have included the code section in question. :-)
$image->evaluateImage(Imagick::EVALUATE_MULTIPLY, $marking->get('opacity') * 0.01, Imagick::CHANNEL_ALPHA);
$image->evaluateImage(Imagick::EVALUATE_MULTIPLY, $marking->get('edging'), Imagick::CHANNEL_ALPHA);
$image->setImageAlphaChannel(Imagick::ALPHACHANNEL_EXTRACT);
Edit 3: We have some screenshots that may help. Please download them here; we had to make a zip file as they were to big to attach to this question. :-)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论