Bitmap Smoothing

Let’s say you are loading in an image. The image is a little to big to fit in the area it is supposed to go in or maybe too small so you have to scale it up a little. The problem is, if you scale it, it will end up looking absolutely horrible. All is not lost. Adobe has an article by Ben Longoria on creating a component called SmoothImage which basically takes your image and once it is loaded in, it casts it as a bitmap in order to apply bitmap smoothing to it. Ok, granted, the article is a little dated. It was created April 6, 2007. It can be used as a basis for your own custom MXML component. Maybe you are the type of person that likes to use Actionscript components instead of MXML components. This basically does the same thing. Once the image is loaded in, it calls this function which casts it as a bitmap and applies smoothing.

[Updated July 28, 2008] Here is an example of an Actionscript classes bases example.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>