public static BufferedImage readByteBufferToBufferedImage(ByteBuffer byteBuffer) throws IOException
{
if(null==byteBuffer)
return null;
byte [] b = byteBuffer.array();
ByteArrayInputStream in = new ByteArrayInputStream(b);
BufferedImage image = ImageIO.read(in);
return image;
}
ByteBuffer转化为BufferedImage
最新推荐文章于 2024-08-01 04:41:28 发布