Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var scale:Number = THUMBWIDTH / IMAGEWIDTH; // or THUMBHEIGHT / IMAGEHEIGHT, assume nalang na THUMBWIDTH / IMAGEWIDTH = THUMBHEIGHT / IMAGEHEIGHT
- 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);
Add Comment
Please, Sign In to add comment