1

In my app I load a bitmap from /assets like this

Bitmap bitmap = BitmapFactory.decodeStream(getAssets().open("MyImage.png"));

Sections of this bitmap are drawn via Canvas.drawBitmap at times into another bitmap that was declared like this

Bitmap bitmap2 = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);

Periodically this bitmap is copied into the Canvas of a SurfaceView as returned by SurfaceHolder.lockCanvas().

As far as I can tell, everything down the chain should be ARGB_8888, and yet images with gradients end up looking like this https://i.stack.imgur.com/VyUJV.png

Mars
  • 33
  • 1
  • 6

0 Answers0