Smoothing is not enabled by default on standard Flex Image controls.
While this doesn’t affect the quality of images displayed at their native resolution, it does reduce the quality of scaled images.
To resolve this, I created a custom control that enables smoothing by default:
package{ import flash.display.Bitmap; import mx.controls.Image; public class SmoothImage extends Image { override protected function updateDisplayList (w : Number, h : Number) : void { super.updateDisplayList (w, h); // checks if the image is a bitmap if (content is Bitmap) { var bitmap : Bitmap = content as Bitmap; if (bitmap != null && bitmap.smoothing == false) { bitmap.smoothing = true; } } } }}
|
You can download this control from the entry I posted to the Flex cookbook:
http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&productId=2&postId=9409&loc=en_US

1 comment
Comments feed for this article
September 20, 2009 at 11:27 am
Witheringtree » Blog Archive » Bitmap Smoothing
[...] July 28, 2008] Here is an example of an Actionscript classes bases [...]