to top
Android APIs
public class

PixelFormat

extends Object
java.lang.Object
   ↳ android.graphics.PixelFormat

Summary

Constants
int A_8
int JPEG This constant is deprecated. use ImageFormat.JPEG instead.
int LA_88
int L_8
int OPAQUE System chooses an opaque format (no alpha bits required)
int RGBA_4444
int RGBA_5551
int RGBA_8888
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 is deprecated. use ImageFormat.NV21 instead.
int YCbCr_422_I This constant is deprecated. use ImageFormat.YUY2 instead.
int YCbCr_422_SP This constant is deprecated. 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)
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int A_8

Since: API Level 1

Constant Value: 8 (0x00000008)

public static final int JPEG

Since: API Level 1

This constant is deprecated.
use ImageFormat.JPEG instead.

Constant Value: 256 (0x00000100)

public static final int LA_88

Since: API Level 1

Constant Value: 10 (0x0000000a)

public static final int L_8

Since: API Level 1

Constant Value: 9 (0x00000009)

public static final int OPAQUE

Since: API Level 1

System chooses an opaque format (no alpha bits required)

Constant Value: -1 (0xffffffff)

public static final int RGBA_4444

Since: API Level 1

Constant Value: 7 (0x00000007)

public static final int RGBA_5551

Since: API Level 1

Constant Value: 6 (0x00000006)

public static final int RGBA_8888

Since: API Level 1

Constant Value: 1 (0x00000001)

public static final int RGBX_8888

Since: API Level 1

Constant Value: 2 (0x00000002)

public static final int RGB_332

Since: API Level 1

Constant Value: 11 (0x0000000b)

public static final int RGB_565

Since: API Level 1

Constant Value: 4 (0x00000004)

public static final int RGB_888

Since: API Level 1

Constant Value: 3 (0x00000003)

public static final int TRANSLUCENT

Since: API Level 1

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

Constant Value: -3 (0xfffffffd)

public static final int TRANSPARENT

Since: API Level 1

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

Constant Value: -2 (0xfffffffe)

public static final int UNKNOWN

Since: API Level 1

Constant Value: 0 (0x00000000)

public static final int YCbCr_420_SP

Since: API Level 1

This constant is deprecated.
use ImageFormat.NV21 instead.

Constant Value: 17 (0x00000011)

public static final int YCbCr_422_I

Since: API Level 5

This constant is deprecated.
use ImageFormat.YUY2 instead.

Constant Value: 20 (0x00000014)

public static final int YCbCr_422_SP

Since: API Level 1

This constant is deprecated.
use ImageFormat.NV16 instead.

Constant Value: 16 (0x00000010)

Fields

public int bitsPerPixel

Since: API Level 1

public int bytesPerPixel

Since: API Level 1

Public Constructors

public PixelFormat ()

Since: API Level 1

Public Methods

public static boolean formatHasAlpha (int format)

Since: API Level 1

public static void getPixelFormatInfo (int format, PixelFormat info)

Since: API Level 1