Builds a MlImage from a
ByteBuffer.
You can pass in either mutable or immutable ByteBuffer. However
once ByteBuffer is passed
in, to keep data integrity you shouldn't modify content in it.
Use ByteBufferExtractor
to get ByteBuffer you passed
in.
|
ByteBufferMlImageBuilder(ByteBuffer
byteBuffer, int width, int height, int imageFormat)
Creates the builder with mandatory
ByteBuffer
and the represented image.
|
| MlImage | |
| ByteBufferMlImageBuilder |
setRotation(int rotation)
Sets value for
MlImage.getRotation().
|
Creates the builder with mandatory ByteBuffer and
the represented image.
We will validate the size of the byteBuffer with given
width, height and imageFormat.
Also calls
setRotation(int) to set the optional properties. If not set, the values will
be set with default:
| byteBuffer | image data object. |
|---|---|
| width | the width of the represented image. |
| height | the height of the represented image. |
| imageFormat | how the data encode the image. |
Sets value for MlImage.getRotation().
| IllegalArgumentException | if the rotation value is not 0, 90, 180 or 270. |
|---|