I am working on a Action Script3 project and i am showing images after resizing. I am using Bitmap and BitmapData manipulation for this but not getting image quality as like original image. Please guide and help me with code that how can i do this.
Thanks & regards
How are you resizing? Normally, you would draw the original bitmap data into the new bitmap data, using a matrix to resize. To smooth scale, you need to use the smoothing option of the draw method. Here's a little sample that takes a library image and scales it to 500x500, using smoothing:
var orig:BitmapData = new baseMap(); //library image
var res:BitmapData = new BitmapData(500,500);
var m:Matrix = new Matrix();
m.scale(res.width / orig.width, res.height / orig.height);
res.draw(orig, m, null, null, null, true);
var c:Bitmap = new Bitmap(res);
toggle the true to false in the draw, to see the difference...
Let's see an example of your problem then. You're not going to get Photoshop quality scaling - in Flash this is scaling with the vector renderer, it's made for speed vs quality. But with smoothing on I find the scaling to be quite acceptable.
I am agree with u that with smoothing true image quality is much better than without smoothing. But I am getting much difference in quality when image has taken as screen short image with any extension as jpg/png/bmp/gif etc.
Can we get screen short image quality as like original after resize? Please help me ..