问题
I am using this code from android developer blog for downloading a BMP file like this one. BitmapFactory.decodeStream always returns null with skia returning false.
I've also tried using BitmapFactory.decodeByteArray with same result. The framework supports BMP files, so what am i missing?
Thanks
EDIT: The code in the blog works for PNG and JPEG images.
回答1:
Okay, i found here, you need to wrap the HttpEntity with a BufferedHttpEntity.
BufferedHttpEntity bufHttpEntity = new BufferedHttpEntity(entity);
来源:https://stackoverflow.com/questions/5886583/bitmapfactory-decode-an-bmp-image