Bitmap.bitmapData sets smoothing to false.

작성자

카테고리:

Bitmap.bitmapData 속성을 통해서 비트맵 이미지를 교체하는 경우 스무딩 속성이 false로 변경되어 버립니다. Bitmap(bd, “auto”, true); 처럼 비트맵 객체를 생성할 때 스무딩을 true로 설정하였다 하더라도, bitmapData 속성을 변경하면, smothing 속성이 무조건 false로 바뀝니다.

var bd1:BitmapData = new BitmapData(300, 225);
bd1.draw(mc, null, null, null, null, true);

var bmp1:Bitmap = new Bitmap(bd1, "auto", true);
var bmp2:Bitmap = new Bitmap(bd1, "auto", true);

addChild(bmp1);
addChild(bmp2);

bmp1.y = bmp2.y = -50;
bmp1.x = 50;
bmp2.x = 350;
bmp1.rotation = bmp2.rotation = 30;

bmp2.bitmapData = bd1;

그러므로 bitmapData 속성을 변경하면, 다음과 같이 smoothing 속성을 다시 true로 설정해 주어야 합니다.

bmp2.smoothing = true;

코멘트

“Bitmap.bitmapData sets smoothing to false.”에 대한 댓글 1개

  1. hungconcon 아바타

    Oh, this method well, but I do not know!, I or thumbnail image, but image noise … : P
    Thank you

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다