public enum PixelFormat extends Enum<PixelFormat>
Notation follows OpenGL notation, i.e. name consist of all it's component names followed by their bit size.
Order of component names is from lowest-bit to highest-bit.
In case component-size is 1 byte (e.g. OpenGL data-type GL_UNSIGNED_BYTE), component names are ordered from lowest-byte to highest-byte. Note that OpenGL applies special interpretation if data-type is e.g. GL_UNSIGNED_8_8_8_8_REV or GL_UNSIGNED_8_8_8_8_REV.
PixelFormat can be converted to OpenGL GLPixelAttributes via
GLPixelAttributes glpa = GLPixelAttributes.convert(PixelFormat pixFmt, GLProfile glp);
See OpenGL Specification 4.3 - February 14, 2013, Core Profile, Section 8.4.4 Transfer of Pixel Rectangles, p. 161-174.
Modifier and Type | Class and Description |
---|---|
static interface |
PixelFormat.Composition
Pixel composition, i.e.
|
static class |
PixelFormat.CType
Component types
|
static class |
PixelFormat.PackedComposition
Packed pixel composition, see
PixelFormat.Composition . |
Enum Constant and Description |
---|
ABGR1555
Stride is 16 bits, 16 bits per pixel, 4
discrete components. |
ABGR8888
Stride is 32 bits, 32 bits per pixel, 4
uniform components of 8 bits. |
ARGB8888
Stride is 32 bits, 32 bits per pixel, 4
uniform components of 8 bits. |
BGR565
Stride is 16 bits, 16 bits per pixel, 3
discrete components. |
BGR888
Stride is 24 bits, 24 bits per pixel, 3
uniform components of of 8 bits. |
BGRA8888
Stride is 32 bits, 32 bits per pixel, 4
uniform components of 8 bits. |
BGRx8888
Stride is 32 bits, 24 bits per pixel, 3
uniform components of 8 bits. |
LUMINANCE
Stride is 8 bits, 8 bits per pixel, 1 component of 8 bits.
|
RGB565
Stride is 16 bits, 16 bits per pixel, 3
discrete components. |
RGB888
Stride 24 bits, 24 bits per pixel, 3
uniform components of 8 bits. |
RGBA5551
Stride is 16 bits, 16 bits per pixel, 4
discrete components. |
RGBA8888
Stride is 32 bits, 32 bits per pixel, 4
uniform components of 8 bits. |
RGBx8888
Stride is 32 bits, 24 bits per pixel, 3
uniform components of 8 bits. |
Modifier and Type | Field and Description |
---|---|
PixelFormat.Composition |
comp
Unique
Pixel Composition , i.e. |
Modifier and Type | Method and Description |
---|---|
static PixelFormat |
valueOf(PixelFormat.Composition comp)
Returns the unique matching
PixelFormat of the given PixelFormat.Composition
or null if none is available. |
static PixelFormat |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PixelFormat[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PixelFormat LUMINANCE
public static final PixelFormat RGB565
public static final PixelFormat BGR565
public static final PixelFormat RGBA5551
public static final PixelFormat ABGR1555
public static final PixelFormat RGB888
public static final PixelFormat BGR888
uniform
components of of 8 bits.
The uniform
components
are interleaved in the order Low to High:
Compatible with:
TYPE_3BYTE_BGR
public static final PixelFormat RGBx8888
uniform
components of 8 bits.
The uniform
components
are interleaved in the order Low to High:
Compatible with:
TYPE_INT_BGR
public static final PixelFormat BGRx8888
uniform
components of 8 bits.
The uniform
components
are interleaved in the order Low to High:
Compatible with:
TYPE_INT_RGB
public static final PixelFormat RGBA8888
uniform
components of 8 bits.
The uniform
components
are interleaved in the order Low to High:
Compatible with:
public static final PixelFormat ABGR8888
uniform
components of 8 bits.
The uniform
components
are interleaved in the order Low to High:
Compatible with:
TYPE_4BYTE_ABGR
public static final PixelFormat ARGB8888
public static final PixelFormat BGRA8888
uniform
components of 8 bits.
The uniform
components
are interleaved in the order Low to High:
Compatible with:
TYPE_INT_ARGB
public final PixelFormat.Composition comp
Pixel Composition
, i.e. layout of its components.public static PixelFormat[] values()
for (PixelFormat c : PixelFormat.values()) System.out.println(c);
public static PixelFormat valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullpublic static PixelFormat valueOf(PixelFormat.Composition comp)
PixelFormat
of the given PixelFormat.Composition
or null
if none is available.Copyright 2010 JogAmp Community.