“屏幕” Java 2D 图形中的效果

发布于 2024-07-13 02:41:44 字数 351 浏览 5 评论 0原文

这是一个困扰我一段时间的问题:

在 Photoshop/GIMP 中,有一个“屏幕”图层合成模式。 此模式中亮色的 Alpha 值较强,深色的 Alpha 值较弱。 黑色是完全透明的,白色是完全不透明的。

我非常希望能够使用 Java 2D 图形来复制这个合成,但是我多次尝试哄骗 AlphaComposite 都失败了 - 事实上,我认为这超出了 AlphaComposite 的能力范围。

可以在此处查看直观示例。

关于如何做到这一点有什么想法吗?

This is a question that's been bugging me for some time now:

In photoshop/GIMP, there is a "screen" layer composition mode. This mode has bright colours have a strong alpha, and dark colours a weak one. Black is entirely transparent, white entirely opaque.

I would dearly love to be able to replicate this composite using Java 2D graphics, but my repeated attempts at trying to coax AlphaComposite into this have failed - and indeed I think this is outside of AlphaComposite's capabilities.

A visual example can be seen here .

Any ideas on how to do this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文