RawImage
public
final
class
RawImage
extends Object
| java.lang.Object | |
| ↳ | com.android.ddmlib.RawImage |
表示从设备帧缓冲区获取的图片的数据。
摘要
常量 | |
|---|---|
int |
COLOR_SPACE_DISPLAY_P3
|
int |
COLOR_SPACE_SRGB
|
int |
COLOR_SPACE_UNKNOWN
|
字段 | |
|---|---|
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
|
公共构造函数 | |
|---|---|
RawImage()
|
|
公共方法 | |
|---|---|
BufferedImage
|
asBufferedImage()
|
int
|
getARGB(int index)
返回 |
int
|
getBlueMask()
返回蓝色对应的掩码值。 |
int
|
getGreenMask()
返回绿色对应的掩码值。 |
static
int
|
getHeaderSize(int version)
返回特定版本的帧缓冲区 adb 协议的标头大小。 |
String
|
getProfileName()
|
int
|
getRedMask()
返回红色对应的掩码值。 |
RawImage
|
getRotated()
返回旋转后的图片。图片按逆时针方向旋转。 |
boolean
|
readHeader(int version, ByteBuffer buf)
从 |
常量
COLOR_SPACE_DISPLAY_P3
public static final int COLOR_SPACE_DISPLAY_P3
常量值: 2 (0x00000002)
COLOR_SPACE_SRGB
public static final int COLOR_SPACE_SRGB
常量值: 1 (0x00000001)
COLOR_SPACE_UNKNOWN
public static final int COLOR_SPACE_UNKNOWN
常量值: 0 (0x00000000)
字段
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
数据
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
版本
public int version
width
public int width
公共构造函数
RawImage
public RawImage ()
公共方法
asBufferedImage
public BufferedImage asBufferedImage ()
| 返回 | |
|---|---|
BufferedImage |
|
getBlueMask
public int getBlueMask ()
返回蓝色对应的掩码值。
此值与 org.eclipse.swt.graphics.PaletteData 兼容
| 返回 | |
|---|---|
int |
|
getGreenMask
public int getGreenMask ()
返回绿色对应的掩码值。
此值与 org.eclipse.swt.graphics.PaletteData 兼容
| 返回 | |
|---|---|
int |
|
getHeaderSize
public static int getHeaderSize (int version)
返回特定版本的帧缓冲区 adb 协议的标头大小。
| 参数 | |
|---|---|
version |
int:协议的版本 |
| 返回 | |
|---|---|
int |
构成标头的 int 的数量。 |
getProfileName
public String getProfileName ()
| 返回 | |
|---|---|
String |
|
getRedMask
public int getRedMask ()
返回红色对应的掩码值。
此值与 org.eclipse.swt.graphics.PaletteData 兼容
| 返回 | |
|---|---|
int |
|
readHeader
public boolean readHeader (int version,
ByteBuffer buf)从 ERROR(/ByteBuffer) 中读取 RawImage 的标头。
数据通过 adb 发送的方式在 system/core/adb/framebuffer_service.c 中定义
| 参数 | |
|---|---|
version |
int:协议的版本。 |
buf |
ByteBuffer:要读取的缓冲区。 |
| 返回 | |
|---|---|
boolean |
如果成功,则为 true |