ByteBufferExtractor

公共类 ByteBufferExtractor

用于从 MPImage 中提取 ByteBuffer 的实用程序。

目前,它仅支持将 MPImageMPImage.STORAGE_TYPE_BYTEBUFFER 搭配使用,否则会抛出 IllegalArgumentException

公共方法

static ByteBuffer
提取MPImage 图片)
MPImage 中提取 ByteBuffer
static ByteBuffer
Extract(MPImage image, int targetFormat)
MPImage 中提取给定 targetFormat 中的只读 ByteBuffer

继承的方法

公共方法

public static ByteBuffer 提取 MPImage 图片)

MPImage 中提取 ByteBuffer

返回的 ByteBuffer 是一个只读视图,其中第一个可用的 MPImageProperties 的存储类型为 MPImage.STORAGE_TYPE_BYTEBUFFER

参数
图片
返回
抛出
IllegalArgumentException 当映像不包含 ByteBuffer 存储空间时。

public static ByteBuffer Extract (MPImage image, int targetFormat)