java - how to decode byte array to bitmap without OOM Exception -
i stuck in out of memory. i’m trying load image byte array ever i’ve done wouldn’t work. bitmap decoder error guess. these code : string password = prefs.getstring("bookkey", ""); bufferedinputstream buf = new bufferedinputstream(new fileinputstream(file)); buf.read(bytes, 0, bytes.length); buf.close(); byte[] bytesdecrpy = decrypt(bytes, password); bitmapfactory.options options = new bitmapfactory.options(); options.indither = true; options.injustdecodebounds = false; options.inpreferredconfig = bitmap.config.argb_8888; options.intempstorage = new byte[32 * 1024]; options.inbitmap = bitmapfactory.decodebytearray(bytesdecrpy, 0, bytesdecrpy.length, options); bm = bitmap.createbitmap(options.outwidth, options.outheight, bitmap.config.argb_8888); imageview.setimage(imagesource.bitmap(bm)); i read byte array encrypt png device file i havin...