fresco icon indicating copy to clipboard operation
fresco copied to clipboard

Why fresco can't load png on Android 5.0,if I modify the source code with Bitmap.Config.RGB565

Open KrystalJake1989 opened this issue 11 years ago • 3 comments

I notice that fresco use ARGB_8888 to load any type image,But I want to decrease the bitmap memory by modifying the source code with RGB565,but then I encounter a problem , when fresco decode png on android 5.0,it uses inbitmap argument while decoding bitmap,it throws a IllegalArgumentException (Problem decoding into existing bitmap),I am a little confuse what cause this problem?

KrystalJake1989 avatar Jun 19 '15 01:06 KrystalJake1989

How did you modify the source code? This argument will happen if Bitmaps.BITMAP_CONFIG was not changed.

tyronen avatar Jun 22 '15 11:06 tyronen

Yes,I change Bitmaps.BITMAP_CONFIG as RGB_565

KrystalJake1989 avatar Jun 26 '15 02:06 KrystalJake1989

RGB_565 doesn't support transparency and this may be the reason why BitmapFactory fails to decode a PNG into it. Anyways, we do not support RGB565 at the moment.

plamenko avatar Jul 08 '15 14:07 plamenko