Guest User

Untitled

a guest
Jan 24th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. var scale:Number = THUMBWIDTH / IMAGEWIDTH; // or THUMBHEIGHT / IMAGEHEIGHT, assume nalang na THUMBWIDTH / IMAGEWIDTH = THUMBHEIGHT / IMAGEHEIGHT
  2.  
  3. var matrix:Matrix = new Matrix();
  4. matrix.scale(scale, scale);
  5.  
  6. var smallBMD:BitmapData = new BitmapData(bigBMD.width * scale, bigBMD.height * scale, true, 0x000000);
  7. smallBMD.draw(bigBMD, matrix, null, null, null, true);
  8.  
  9. var bitmap:Bitmap = new Bitmap(smallBMD, PixelSnapping.NEVER, true);
Add Comment
Please, Sign In to add comment