請幫我ㅠㅠFLEX:調整圖像大小後,imageRotate無法正常工作
我正在製作ImageEditor。但我有一個圖像旋轉功能的問題。
當我加載圖像,然後旋轉它,旋轉功能工作得很好。
但調整大小(寬,高)加載圖片後,旋轉工作可笑...
Pixed圖像的寬度,高度,它只能旋轉圖片的內容..
其結果是,圖像質量去down ...
這是一個屏幕截圖。
哦..我不能發佈圖片..因爲聲譽限制...: - <
http://blog.naver.com/hago89n/150164439917
請訪問我的博客,並確認截圖..
你能理解我問題?
嗯..代碼是在這裏
//調整按鈕單擊處理
private function btn_resize_clickHandler(event:MouseEvent):void
{
image.width = parseInt(ti_width.text.toString());
image.height = parseInt(ti_height.text.toString());
}
//旋轉按鈕單擊處理
private function btn_rotateCCW_clickHandler(event:MouseEvent):void
{//Rotate Counter ClockWise
var o_rotateimage:RotateImage = new RotateImage();
o_rotateimage.rotateCCW(image);
}
//旋轉功能RotateImage.as
public function rotateCCW(image:Image):void
{
m = new Matrix();
m.rotate(Math.PI/2);
m.tx = image.height;
var bd:BitmapData = new BitmapData(image.height as int, image.width as int);
bd.draw(image, m);
image.source = new Bitmap(bd);
}
嗨,我不知道我明白你的問題很好。看看我的例子。這是你想要的嗎? http://it-skills.su/sosamples/webspark46/imageeditor/SO_ImageEditor.html – Anton 2013-03-31 23:34:02