Flex:如何调整图像控件内图像的对比度/亮度?

时间:2010-04-29 16:59:20

标签: flex image-manipulation

我将图像加载到Image控件中,我想知道以编程方式使图像变暗/变亮的最有效方式。

2 个答案:

答案 0 :(得分:2)

查看Adobe的BitmapFilter课程。你可以用它做一些非常酷的事情。特别是看看它的派生类及其用法示例。

答案 1 :(得分:0)

虽然我选择了Robusto的方法,但我也发现这很有效

var a:Number = value * 11;
var b:Number = 63.5 - (value * 698.5);
redValue = greenValue = blueValue = a;
redOffset = greenOffset = blueOffset = b;
var cmf:ColorMatrixFilter = new ColorMatrixFilter(a, 0, 0, 0, b, 0, a, 0, 0, b, 0, 0, a, 0, b, 0, 0, 0, 1, 0);

它是从这里拍摄的,Image Manipulation In Flex并且还有更多的图像改变乐趣。

相关问题