Andengine reducing sprite quality?

I have a problem with bandings using andengine. When painting a picture on PC and uploading it to my phone, they look exactly the same. But as soon as I use that bitmap (PNG) in Andengine, I have bandings (big color steps).

Now I know that my display is capable of displaying the image right and I know how to us dithering but it bothers me. Does anyone know how to disable this quality reduction in Andengine?

• Post the code you are using to load the texture. If you are using the RGBA_4444 type of texture, that might be one of the reasons. – sm4 Feb 14 '14 at 3:28
• textureAtlas = new BitmapTextureAtlas(activity.getTextureManager(), 300, 300, TextureOptions.DEFAULT); – user42152 Feb 15 '14 at 21:53

You are using TextureOptions.DEFAULT. If you inspect the TextureOptions class, you will notice that:

public static final TextureOptions DEFAULT = NEAREST;


Which means your textures are being resampled using nearest-neighbor interpolation. AndEngine will automatically scale your game to the phone's resolution. If you are not scaling in steps of 2 (e.g. your resolution of choice is 800x480 and your phone's resolution is 1280x768) it will create "bandings".

Try TextureOptions.BILINEAR or TextureOptions.BILINEAR_PREMULTIPLYALPHA.

You can also try whether the following option improves the banding:

engineOptions.getRenderOptions().setDithering(true);

• I already tried both of them and it didnt change anything. i am using a camera size of 1600x960. and the ratio is not the same as my phone. but even changing it to half of it wont make the bandings disappear – user42152 Feb 24 '14 at 16:38
• @user42152 I've added another option to improve the sprite quality to the answer. – sm4 Feb 28 '14 at 7:01
• yeah thanks. changing the TextureOptions didnt change anything. I am using dithering now as i didnt seem to have any performance issues. – user42152 Mar 3 '14 at 15:19