RuntimeException: Buffer not large enough for pixels

后端 未结 2 2020
耶瑟儿~
耶瑟儿~ 2021-01-13 08:38

I\'m receiving a Bitmap in byte array through socket and I read it and then I want to set it os.toByteArray as ImageView in my application. The cod

2条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-13 09:29

    The buffer size should be exactly 1553040B (assuming bitmap's height, width and 32bit to encode each color).

提交回复
热议问题