How to get a Bitmap from a raw image

前端 未结 4 1274
生来不讨喜
生来不讨喜 2020-12-15 12:23

I am reading a raw image from the network. This image has been read by an image sensor, not from a file.

These are the things I know about the image:
~ Height &a

4条回答
  •  天涯浪人
    2020-12-15 12:46

    Use Drawable create from stream. Here's how to do it with an HttpResponse, but you can get the inputstream anyway you want.

      InputStream stream = response.getEntity().getContent();
    
      Drawable drawable = Drawable.createFromStream(stream, "Get Full Image Task");
    

提交回复
热议问题