dcmike27
12-04-2008, 11:49 AM
I have a function that desaturates a bitmap image.
private function desaturate():void{
var mat:Array = [ .33,.33,.33,0,0,.33,.33,.33,0,0,.33,.33,.33,0,0,.3 3,.33,.33,1,0 ];
var colorMat:ColorMatrixFilter = new ColorMatrixFilter(mat);
var myFilters:Array = new Array();
myFilters.push(colorMat);
mythumb.filters = myFilters;
}
This works fine.
But I need a function that re-saturates the bitmap (in other words, remove the color transformation. I've tried setting mythumb.filters = null as the documentation suggests, but that doesn't work.
Any suggestions would be greatly appreciated. Thanks.
private function desaturate():void{
var mat:Array = [ .33,.33,.33,0,0,.33,.33,.33,0,0,.33,.33,.33,0,0,.3 3,.33,.33,1,0 ];
var colorMat:ColorMatrixFilter = new ColorMatrixFilter(mat);
var myFilters:Array = new Array();
myFilters.push(colorMat);
mythumb.filters = myFilters;
}
This works fine.
But I need a function that re-saturates the bitmap (in other words, remove the color transformation. I've tried setting mythumb.filters = null as the documentation suggests, but that doesn't work.
Any suggestions would be greatly appreciated. Thanks.