Hi,

I'm having a lot of trouble with down-sampling a bitmapData.

I tried the smoothing option first

public function produceResizedBitmapData(image:DisplayObject, 
transform:Matrix):BitmapData
{
        var temp:BitmapData = new BitmapData(image.width, image.height, true, 
0x00FFFFFF);
        temp.draw(image);
        
        var clone:BitmapData = new BitmapData(image.width*transform.a, 
image.height*transform.d, true, 0x00FFFFFF);
        clone.draw(temp, transform, null, null, null, true);
        
        temp.dispose();
        return clone;
}

except the quality was poor, once the image was of a certain size.
For example scaling a 2500px image down to 200px.

I've tried using clevrLib plus a pixelBender bilinear sampler but no go.
I've noticed it works in picnik so it must be possible.

Can anyone push me in the right direction.

Reply via email to