How to get a Bitmap from a raw image

前端 未结 4 1280
生来不讨喜
生来不讨喜 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

    Once I did something like this to decode the byte stream obtained from camera preview callback:

        Bitmap.createBitmap(imageBytes, previewWidth, previewHeight, 
                            Bitmap.Config.ARGB_8888);
    

    Give it a try.

提交回复
热议问题