matrix變形矩陣原值,此值忠於原圖,不會改變原圖的色相、飽合度、明度等。
991221_ColorMF_hue.swf
package { import flash.display.Sprite; import flash.filters.ColorMatrixFilter; import flash.display.BitmapData; import flash.display.Bitmap; import flash.display.DisplayObject; // public class ColorMF_hue_991221 extends Sprite{ public var bmd:BitmapData = new MyPhoto(0,0); public var bm:Bitmap = new Bitmap(bmd); public function ColorMF_hue_991221() { addChild(bm); var matrix:Array = new Array(); matrix = matrix.concat([0, 0, 1, 0, 0]); //RED Channel matrix = matrix.concat([0, 1, 0, 0, 0]); //GREEN Channel matrix = matrix.concat([1, 0, 0, 0, 0]); //BLUE Channel matrix = matrix.concat([0, 0, 0, 1, 0]); //ALPHA Channel var myFilter:ColorMatrixFilter = new ColorMatrixFilter(matrix); bm.filters = [myFilter]; } } }
沒有留言:
張貼留言