Frame.BitmapFrame, Frame.ByteArrayFrame, Frame.COLOR_FORMAT, Frame.ROTATE
colorFormat, originalBitmap, TAG
Constructor and Description |
---|
Frame.ByteArrayFrame(byte[] array,
int frameWidth,
int frameHeight,
Frame.COLOR_FORMAT frameColorFormat)
Constructs a
ByteArrayFrame that wraps the specified byte array. |
Modifier and Type | Method and Description |
---|---|
byte[] |
getByteArray()
Get underlying byte array of pixels.
|
int |
getHeight()
Get
Frame 's height. |
int |
getWidth()
Get
Frame 's width. |
getColorFormat, getOriginalBitmapFrame, getPixelCount, getTargetRotation, revertPointRotation, revertPointRotation, rotateImage, setTargetRotation
public Frame.ByteArrayFrame(byte[] array, int frameWidth, int frameHeight, Frame.COLOR_FORMAT frameColorFormat)
ByteArrayFrame
that wraps the specified byte array. Default rotation is set to
Frame.ROTATE.NO_ROTATION
.
array
- a byte[]
to encapsulate.frameWidth
- Frame
's width.frameHeight
- Frame
's height.frameColorFormat
- the Frame.COLOR_FORMAT
of the byte[]
specified.NullPointerException
- if array
is null
.IllegalArgumentException
- if frameWidth
or/and frameHeight
less than or equal to zero, or not does
not match the expect frame size with the provided frameColorFormat
.public byte[] getByteArray()
Frame
's byte array of pixelspublic int getWidth()
Frame
Frame
's width.Copyright © 2015. All rights reserved.