import flash.display.BitmapData; import flash.display.Bitmap; /** * 将图像的Alpha通道转换为黑白图像(分离ARGB方式) */ var bmpd:BitmapData = new ImagePNG();//绑定的png图片 var pixBmpd:BitmapData = new BitmapData(bmpd.width,bmpd.height,false); for (var i:int=0; i< bmpd.heigh
import flash.display.BitmapData; /** * 将图像的Alpha通道转换为黑白图像 */ var p:Point = new Point(0,0); var bmpd:BitmapData = new ImagePNG();//绑定的png图片 var channelBmpd:BitmapData = new BitmapData(bmpd.width,bmpd.height,true,0x00000000); channelBmpd.fillRect(bmpd.