How to convert android.media.Image to bitmap object?

前端 未结 5 779
余生分开走
余生分开走 2020-12-02 23:34

In android, I get an Image object from here https://inducesmile.com/android/android-camera2-api-example-tutorial/ this camera tutorial. But I want to now loop through the pi

5条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-03 00:04

    https://docs.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html#get%28byte[]%29

    According to the java docs: The buffer.get method transfers bytes from this buffer into the given destination array. An invocation of this method of the form src.get(a) behaves in exactly the same way as the invocation

     src.get(a, 0, a.length) 
    

提交回复
热议问题