as3 两个 bitmapData 对象,应用 colorburn、变暗或多重过滤器

发布于 2024-12-23 04:26:19 字数 194 浏览 6 评论 0原文

Photoshop 和 Fireworks 都有一些不错的滤镜。当您将一个位图放在另一个位图之上时,第一个位图可以充当过滤器。例如,顶部位图的白色像素使底部位图的像素变亮。

有没有办法在as3中应用这个?

我想要实现的目标:

我有一个大的单色位图数据对象。我想叠加柏林噪声并使单色位图变亮/变暗,以赋予其一些随机/自然的外观。

Photoshop and Fireworks both have some nice filters. When you put one bitmap over the other, the first bitmap can act as filter. For example, the white pixels of the top bitmap lighten the pixels of the bottom bitmap.

Is there any way to apply this in as3?

What I am trying to accomplish:

I have a large single-color bitmapdata object. I want to overlay perlin noise and lighten/darken the single-color bitmap to give it some random/natural look.

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

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

发布评论

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

评论(1

心凉 2024-12-30 04:26:19

Flash 中有 BlendMode ,很像您在 Photoshop 中提到的混合选项。它们不仅可以用于 Bitmap 对象,还可以用于任何从 DisplayObject 派生的对象。

实现您想要的效果的一种方法是创建一个 Bitmap(我们称之为 noiseBitmap),其中包含您想要的噪波,因为它是 bitmapData,并且然后设置noiseBitmap.blendMode = BlendMode.LIGHTEN,或者设置满足您需求的特定选项。将此位图覆盖在实体位图上。

There are BlendMode's in Flash, much like the blending options you refer to in Photoshop. They can be used not only on Bitmap objects, but really anything which descends from DisplayObject.

One way to achieve the effect you want is to create a Bitmap (let's call it noiseBitmap) with the noise you want as it's bitmapData, and then set noiseBitmap.blendMode = BlendMode.LIGHTEN, or which ever specific one suits your needs. Overlay this Bitmap on the solid one.

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