Flex: How to adjust the contrast / brightness of an image inside an image control?
2 answers
Check out the Adobe BitmapFilter class. You can do some pretty cool stuff with it. Take a special look at its derived classes and examples of their use.
+2
a source to share
Although I went with Robusto method, I also found this, which works well
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);
This is where "Manipulating Images in Flex" was taken , and a lot more fun with modifying images.
0
a source to share