1 Reply Latest reply on Sep 17, 2010 9:58 AM by jchunick

    Scaling down with antialiasing?

    FlashGodThe2nd Level 1



      I have a function for drawing with a pixel brush and I have to scale the drawing down. I tried scaling the same member as sprite but the drawn lines doesn't look so good. I know that I could use a 3d member and put the bitmap as texture on it but this might be a bit too much ... is there an easier way?


      I also tried stacking the same member as sprites over each other with some pixel offset and lower blend but it looked still very pixeled.


      Any ideas?

        • 1. Re: Scaling down with antialiasing?
          jchunick Level 2

          scaling on the sprite level or through the image methods such as copyPixels() will only do a 'nearest neighbour' type of resampling. This is why you are not getting the antialiasing you would expect. Other popular resampling methods are bilinear and bicubic and these ones will antialias because they use the surrounding pixels in an averaging of the value of the current pixel being analyzed during the resampling process.


          Anyways, you can try using an Xtra to resample (scale) the image such as Valentin's ImgXtra here: