public final class RawImage
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
int |
alpha_length |
int |
alpha_offset |
int |
blue_length |
int |
blue_offset |
int |
bpp |
byte[] |
data |
int |
green_length |
int |
green_offset |
int |
height |
int |
red_length |
int |
red_offset |
int |
size |
int |
version |
int |
width |
Constructor and Description |
---|
RawImage() |
Modifier and Type | Method and Description |
---|---|
int |
getARGB(int index)
Returns an ARGB integer value for the pixel at index in
data . |
int |
getBlueMask()
Returns the mask value for the blue color.
|
int |
getGreenMask()
Returns the mask value for the green color.
|
static int |
getHeaderSize(int version)
Returns the size of the header for a specific version of the framebuffer adb protocol.
|
int |
getRedMask()
Returns the mask value for the red color.
|
RawImage |
getRotated()
Returns a rotated version of the image
The image is rotated counter-clockwise.
|
boolean |
readHeader(int version,
java.nio.ByteBuffer buf)
Reads the header of a RawImage from a
ByteBuffer . |
public int version
public int bpp
public int size
public int width
public int height
public int red_offset
public int red_length
public int blue_offset
public int blue_length
public int green_offset
public int green_length
public int alpha_offset
public int alpha_length
public byte[] data
public boolean readHeader(int version, java.nio.ByteBuffer buf)
ByteBuffer
.
The way the data is sent over adb is defined in system/core/adb/framebuffer_service.c
version
- the version of the protocol.buf
- the buffer to read from.public int getRedMask()
This value is compatible with org.eclipse.swt.graphics.PaletteData
public int getGreenMask()
This value is compatible with org.eclipse.swt.graphics.PaletteData
public int getBlueMask()
This value is compatible with org.eclipse.swt.graphics.PaletteData
public static int getHeaderSize(int version)
version
- the version of the protocolpublic RawImage getRotated()
public int getARGB(int index)
data
.