RawImage
public
final
class
RawImage
extends Object
| java.lang.Object | |
| ↳ | com.android.ddmlib.RawImage |
Data representing an image taken from a device frame buffer.
Summary
Constants | |
|---|---|
int |
COLOR_SPACE_DISPLAY_P3
|
int |
COLOR_SPACE_SRGB
|
int |
COLOR_SPACE_UNKNOWN
|
Fields | |
|---|---|
public
int |
alpha_length
|
public
int |
alpha_offset
|
public
int |
blue_length
|
public
int |
blue_offset
|
public
int |
bpp
|
public
int |
colorSpace
|
public
byte[] |
data
|
public
int |
green_length
|
public
int |
green_offset
|
public
int |
height
|
public
int |
red_length
|
public
int |
red_offset
|
public
int |
size
|
public
int |
version
|
public
int |
width
|
Public constructors | |
|---|---|
RawImage()
|
|
Public methods | |
|---|---|
BufferedImage
|
asBufferedImage()
|
int
|
getARGB(int index)
Returns an ARGB integer value for the pixel at index in |
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. |
String
|
getProfileName()
|
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, ByteBuffer buf)
Reads the header of a RawImage from a |
Constants
COLOR_SPACE_DISPLAY_P3
public static final int COLOR_SPACE_DISPLAY_P3
Constant Value: 2 (0x00000002)
COLOR_SPACE_SRGB
public static final int COLOR_SPACE_SRGB
Constant Value: 1 (0x00000001)
COLOR_SPACE_UNKNOWN
public static final int COLOR_SPACE_UNKNOWN
Constant Value: 0 (0x00000000)
Fields
alpha_length
public int alpha_length
alpha_offset
public int alpha_offset
blue_length
public int blue_length
blue_offset
public int blue_offset
bpp
public int bpp
colorSpace
public int colorSpace
data
public byte[] data
green_length
public int green_length
green_offset
public int green_offset
height
public int height
red_length
public int red_length
red_offset
public int red_offset
size
public int size
version
public int version
width
public int width
Public constructors
RawImage
public RawImage ()
Public methods
asBufferedImage
public BufferedImage asBufferedImage ()
| Returns | |
|---|---|
BufferedImage |
|
getARGB
public int getARGB (int index)
Returns an ARGB integer value for the pixel at index in data.
| Parameters | |
|---|---|
index |
int |
| Returns | |
|---|---|
int |
|
getBlueMask
public int getBlueMask ()
Returns the mask value for the blue color.
This value is compatible with org.eclipse.swt.graphics.PaletteData
| Returns | |
|---|---|
int |
|
getGreenMask
public int getGreenMask ()
Returns the mask value for the green color.
This value is compatible with org.eclipse.swt.graphics.PaletteData
| Returns | |
|---|---|
int |
|
getHeaderSize
public static int getHeaderSize (int version)
Returns the size of the header for a specific version of the framebuffer adb protocol.
| Parameters | |
|---|---|
version |
int: the version of the protocol |
| Returns | |
|---|---|
int |
the number of int that makes up the header. |
getProfileName
public String getProfileName ()
| Returns | |
|---|---|
String |
|
getRedMask
public int getRedMask ()
Returns the mask value for the red color.
This value is compatible with org.eclipse.swt.graphics.PaletteData
| Returns | |
|---|---|
int |
|
getRotated
public RawImage getRotated ()
Returns a rotated version of the image The image is rotated counter-clockwise.
| Returns | |
|---|---|
RawImage |
|
readHeader
public boolean readHeader (int version,
ByteBuffer buf)Reads the header of a RawImage from a ERROR(/ByteBuffer).
The way the data is sent over adb is defined in system/core/adb/framebuffer_service.c
| Parameters | |
|---|---|
version |
int: the version of the protocol. |
buf |
ByteBuffer: the buffer to read from. |
| Returns | |
|---|---|
boolean |
true if success |