Distortion/Pixelation when scaling

How do you avoid the distortion that occurs when you decrease the scaleX and scaleY of a .png?

image
image

make sure that in the constructor for your bitmap you are setting smoothing to true.
It’s the third parameter on the constructor:

https://api.openfl.org/openfl/display/Bitmap.html#new

Also, If you change the bitmapData property of a bitmap the smoothing flag resets so you have to set it again.

4 Likes

Thank you, Milton. I’ll try that out.

Well that was simple, thank you for your help.

1 Like