Actionscript 中的灰度和 Alpha 蒙版
我想制作一个蒙版,将任何颜色转换为灰度,然后降低它们的 alpha 值。预期目的是使遮蔽区域呈灰度且更亮,从而使未遮蔽区域更加突出。我见过的大多数有关 alpha 值蒙版的教程都过于复杂并且使用 Flash GUI。如何在 ActionScript 中完成同样的事情?
更新:这是带图片的说明...
如果以下是我的图像:
然后,对某些选择进行传统遮罩将产生以下结果:
相反,那些被遮罩的部分完全地,我希望那些是转换为灰度:
并且它们的 alpha 值降低,因此变亮:
I would like to make a mask that both converts any colors to grayscale and then reduces their alpha value. The intended purpose is for the masked region to be in grayscale and lighter so that the unmasked region is more prominent. Most tutorials I've seen for alpha value masks are far too complicated and use the Flash GUI. How do you accomplish the same thing in ActionScript?
Update: Here's an explanation with pictures...
If the following is my image:
Then a traditional mask over some selection would produce the following:
Instead, those parts that are masked out completely, I would like for those to be converted to grayscale:
And their alpha value decreased, so they're lightened:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我的建议:
我希望这会有所帮助。如果您仍然不确定,请观看 Primer。
My recommendation :
I hope this helps. And if you're still not sure, just watch Primer.