Android: BitmapFactory.decodeByteArray gives pixelated bitmap

前端 未结 3 2224
忘了有多久
忘了有多久 2020-12-05 20:11

I am working on an Android app that displays photos which are downloaded from Flickr. I obtain a bitmap object from a byte array, which in turn is read from the relevant Fli

3条回答
  •  半阙折子戏
    2020-12-05 21:07

    Some version of Android have a bug in Bitmap class and convert the Bitmap to RGB_565 upon some operations. This would manifest itself in artifacts similar to those on your picture. This would also explain the banding of the blue sky. Also, have in mind that android attempts to "optimize" image by converting them to rgb_565 upon loading and even compiling in resource files. Take a look at: http://android.nakatome.net/2010/04/bitmap-basics.html

提交回复
热议问题