是否可以对同一张图像使用两次evaluateImage?

发布于 2025-01-13 11:16:14 字数 952 浏览 4 评论 0原文

我们正在创建一个工具来从多个图像构建图像,如下所示: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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文