ActionScript-3 中的图像处理和效果
我想在 ActionScript-3 中的 BitmapData 上实现各种效果,如棕褐色、灰度、海报化等。
如何做到这一点以及最有效的方法是什么?
提前致谢!!
I want to implement various effects like Sepia, GrayScale, Posterization etc. on BitmapData in ActionScript-3.
How to do this and What is most efficient way to do this ?
Thanks in advance!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
进行图像处理的最有效方法是使用 Adobe Pixel Bender。这基本上是一种类似于像素着色器的语言,可用于为 Photoshop、After Effects 和 Flash 创建滤镜。还有一个开发者共享的交流平台过滤器。
这是有关如何将像素弯曲滤镜加载到 Flash 中的教程。
如果您在 Google 中搜索“pixel Bender flash”。
The most efficient way to do image processing would be to use Adobe Pixel Bender. This is basically a pixel shader like language that can be used to create filters for Photoshop, After Effects and Flash. There is also an exchange where developers share filters.
Here is a tutorial on how to load pixel bender filter into flash.
There is more information available if you search Google for "pixel bender flash".
这篇文章解释了如何进行灰度:
AS3 :如何将彩色Bitmap的BitmapData更改为黑白?
棕褐色是灰度和着色的组合。着色通常是通过将其中一个颜色通道乘以一定的量来增强该颜色来完成的。
该文章中阐述的技术是您应该继续进行的方法。您必须查找每像素过滤算法,但其中许多都存在于维基百科或数学网站上。
This post explains how to do the GrayScale:
AS3:How to change a colored Bitmap's BitmapData to black and white?
Sepia is a combination of grayscale and tinting. Tinting is typically accomplished by multiplying one of the colour channels by a certain amount to boost that colour.
The techniques illustrated in that post are the way you should proceed. You'll have to look up the per-pixel filtering algorithms, but many of them exist on wikipedia or math sites.