开发者

BitmapFactory decode an BMP image

开发者 https://www.devze.com 2023-03-03 10:45 出处:网络
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 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 bl开发者_如何学Pythonog works for PNG and JPEG images.


Okay, i found here, you need to wrap the HttpEntity with a BufferedHttpEntity.

BufferedHttpEntity bufHttpEntity = new BufferedHttpEntity(entity);
0

精彩评论

暂无评论...
验证码 换一张
取 消