[proxy] web.archive.org← back | site home | direct (HTTPS) ↗ | proxy home | ◑ dark◐ light

PixelFormat  |  Android Developers

public class PixelFormat
extends Object



Summary

Constants

int A_8
int JPEG

This constant was deprecated in API level 15. use ImageFormat.JPEG instead.

int LA_88
int L_8
int OPAQUE

System chooses an opaque format (no alpha bits required)

int RGBA_1010102
int RGBA_4444
int RGBA_5551
int RGBA_8888
int RGBA_F16
int RGBX_8888
int RGB_332
int RGB_565
int RGB_888
int TRANSLUCENT

System chooses a format that supports translucency (many alpha bits)

int TRANSPARENT

System chooses a format that supports transparency (at least 1 alpha bit)

int UNKNOWN
int YCbCr_420_SP

This constant was deprecated in API level 15. use ImageFormat.NV21 instead.

int YCbCr_422_I

This constant was deprecated in API level 15. use ImageFormat.YUY2 instead.

int YCbCr_422_SP

This constant was deprecated in API level 15. use ImageFormat.NV16 instead.

Fields

public int bitsPerPixel
public int bytesPerPixel

Public constructors

PixelFormat()

Public methods

static boolean formatHasAlpha(int format)
static void getPixelFormatInfo(int format, PixelFormat info)

Inherited methods

From class java.lang.Object

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Constants

A_8

public static final int A_8

Constant Value: 8 (0x00000008)

JPEG

public static final int JPEG

This constant was deprecated in API level 15.
use ImageFormat.JPEG instead.

Constant Value: 256 (0x00000100)

LA_88

public static final int LA_88

Constant Value: 10 (0x0000000a)

L_8

public static final int L_8

Constant Value: 9 (0x00000009)

OPAQUE

public static final int OPAQUE

System chooses an opaque format (no alpha bits required)

Constant Value: -1 (0xffffffff)

RGBA_1010102

public static final int RGBA_1010102

Constant Value: 43 (0x0000002b)

RGBA_4444

public static final int RGBA_4444

Constant Value: 7 (0x00000007)

RGBA_5551

public static final int RGBA_5551

Constant Value: 6 (0x00000006)

RGBA_8888

public static final int RGBA_8888

Constant Value: 1 (0x00000001)

RGBA_F16

public static final int RGBA_F16

Constant Value: 22 (0x00000016)

RGBX_8888

public static final int RGBX_8888

Constant Value: 2 (0x00000002)

RGB_332

public static final int RGB_332

Constant Value: 11 (0x0000000b)

RGB_565

public static final int RGB_565

Constant Value: 4 (0x00000004)

RGB_888

public static final int RGB_888

Constant Value: 3 (0x00000003)

TRANSLUCENT

public static final int TRANSLUCENT

System chooses a format that supports translucency (many alpha bits)

Constant Value: -3 (0xfffffffd)

TRANSPARENT

public static final int TRANSPARENT

System chooses a format that supports transparency (at least 1 alpha bit)

Constant Value: -2 (0xfffffffe)

UNKNOWN

public static final int UNKNOWN

Constant Value: 0 (0x00000000)

YCbCr_420_SP

public static final int YCbCr_420_SP

This constant was deprecated in API level 15.
use ImageFormat.NV21 instead.

Constant Value: 17 (0x00000011)

YCbCr_422_I

public static final int YCbCr_422_I

This constant was deprecated in API level 15.
use ImageFormat.YUY2 instead.

Constant Value: 20 (0x00000014)

YCbCr_422_SP

public static final int YCbCr_422_SP

This constant was deprecated in API level 15.
use ImageFormat.NV16 instead.

Constant Value: 16 (0x00000010)

Fields

bitsPerPixel

public int bitsPerPixel

bytesPerPixel

public int bytesPerPixel

Public constructors

PixelFormat

public PixelFormat ()

Public methods

formatHasAlpha

public static boolean formatHasAlpha (int format)
Parameters
format int: Value is RGBA_8888, RGBX_8888, RGBA_F16, RGBA_1010102, RGB_888, RGB_565, or android.graphics.PixelFormat.R_8
Returns
boolean

getPixelFormatInfo

public static void getPixelFormatInfo (int format, 
                PixelFormat info)
Parameters
format int: Value is RGBA_8888, RGBX_8888, RGBA_F16, RGBA_1010102, RGB_888, RGB_565, or android.graphics.PixelFormat.R_8
info PixelFormat