What is the best way to resize a BitmapData object?
actionscript-3, bitmapdata, flash, image, resize
Solution
This works:
var scale:Number = 1.0/6.0;
var matrix:Matrix = new Matrix();
matrix.scale(scale, scale);
var smallBMD:BitmapData = new BitmapData(bigBMD.width * scale, bigBMD.height * scale, true, 0x000000);
smallBMD.draw(bigBMD, matrix, null, null, null, true);
var bitmap:Bitmap = new Bitmap(smallBMD, PixelSnapping.NEVER, true);
Problem
Say I have a BitmapData of 600x600 and I want to scale it down to 100x100.