公共类
ByteBufferImageBuilder
从 ByteBuffer
构建 MPImage
。
您可以传入可变或不可变的 ByteBuffer
。不过,传入 ByteBuffer
后,为了确保数据的完整性,您不应修改其中的内容。
使用 ByteBufferExtractor
获取您传入的 ByteBuffer
。
公共构造函数
ByteBufferImageBuilder(ByteBuffer byteBuffer, int width, int height, int imageFormat)
使用必需的
ByteBuffer 和表示的映像创建构建器。 |
公共方法
MPImage |
继承的方法
公共构造函数
public ByteBufferImageBuilder (ByteBuffer byteBuffer, int width, int height, int imageFormat)
使用必需的 ByteBuffer
和表示的映像创建构建器。
我们将使用给定的 width
、height
和 imageFormat
验证 byteBuffer
的大小。
参数
byteBuffer | 图像数据对象。 |
---|---|
宽度 | 所代表图片的宽度。 |
高度 | 所代表图片的高度。 |
imageFormat | 数据编码图片的方式。 |