FileDocCategorySizeDatePackage
PixelFormat.javaAPI DocAndroid 1.5 API2802Wed May 06 22:42:00 BST 2009android.graphics

PixelFormat

public class PixelFormat extends Object

Fields Summary
public static final int
UNKNOWN
public static final int
TRANSLUCENT
System chooses a format that supports translucency (many alpha bits)
public static final int
TRANSPARENT
System chooses a format that supports transparency (at least 1 alpha bit)
public static final int
OPAQUE
System chooses an opaque format (no alpha bits required)
public static final int
RGBA_8888
public static final int
RGBX_8888
public static final int
RGB_888
public static final int
RGB_565
public static final int
RGBA_5551
public static final int
RGBA_4444
public static final int
A_8
public static final int
L_8
public static final int
LA_88
public static final int
RGB_332
public static final int
YCbCr_422_SP
YCbCr formats, used for video. These are not necessarily supported by the hardware.
public static final int
YCbCr_420_SP
public static final int
JPEG
Encoded formats. These are not necessarily supported by the hardware.
public int
bytesPerPixel
public int
bitsPerPixel
Constructors Summary
Methods Summary
public static booleanformatHasAlpha(int format)


    /*
     * We use a class initializer to allow the native code to cache some
     * field offsets.
     */
        
      nativeClassInit(); 
        switch (format) {
            case PixelFormat.A_8:
            case PixelFormat.LA_88:
            case PixelFormat.RGBA_4444:
            case PixelFormat.RGBA_5551:
            case PixelFormat.RGBA_8888:
            case PixelFormat.TRANSLUCENT:
            case PixelFormat.TRANSPARENT:
                return true;
        }
        return false;
    
public static native voidgetPixelFormatInfo(int format, android.graphics.PixelFormat info)

private static native voidnativeClassInit()