public class PixelFormatUtil extends Object
All conversion methods are endian independent.
Modifier and Type | Class and Description |
---|---|
static interface |
PixelFormatUtil.PixelSink |
static interface |
PixelFormatUtil.PixelSink32
Pixel sink for up-to 32bit.
|
Constructor and Description |
---|
PixelFormatUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
convert32(PixelFormatUtil.PixelSink32 dest32,
ByteBuffer src_bb,
PixelFormat src_fmt,
boolean src_glOriented,
int width,
int height,
int stride_bytes) |
static void |
convert32(PixelFormatUtil.PixelSink32 destInt32,
PixelRectangle src) |
static PixelRectangle |
convert32(PixelRectangle src,
PixelFormat destFmt,
int ddestStride,
boolean isGLOriented,
boolean destIsDirect) |
static int |
convertToInt32(PixelFormat dest_fmt,
byte r,
byte g,
byte b,
byte a) |
static int |
convertToInt32(PixelFormat dest_fmt,
PixelFormat src_fmt,
ByteBuffer src,
int srcOff) |
static int |
convertToInt32(PixelFormat dest_fmt,
PixelFormat src_fmt,
int src_pixel) |
static PixelFormat |
getReversed(PixelFormat fmt)
Returns the
PixelFormat with reversed components of fmt . |
static int |
getValue32(PixelFormat src_fmt,
ByteBuffer src,
int srcOff) |
public static PixelFormat getReversed(PixelFormat fmt)
PixelFormat
with reversed components of fmt
.
If no reversed PixelFormat
is available, returns fmt
.public static int getValue32(PixelFormat src_fmt, ByteBuffer src, int srcOff)
public static int convertToInt32(PixelFormat dest_fmt, byte r, byte g, byte b, byte a)
public static int convertToInt32(PixelFormat dest_fmt, PixelFormat src_fmt, ByteBuffer src, int srcOff)
public static int convertToInt32(PixelFormat dest_fmt, PixelFormat src_fmt, int src_pixel)
public static PixelRectangle convert32(PixelRectangle src, PixelFormat destFmt, int ddestStride, boolean isGLOriented, boolean destIsDirect)
public static void convert32(PixelFormatUtil.PixelSink32 destInt32, PixelRectangle src)
public static void convert32(PixelFormatUtil.PixelSink32 dest32, ByteBuffer src_bb, PixelFormat src_fmt, boolean src_glOriented, int width, int height, int stride_bytes)
dest32
- 32bit pixel sinksrc_bb
- src_fmt
- src_glOriented
- if true, the source memory is laid out in OpenGL's coordinate system, origin at bottom left,
otherwise origin at top left.width
- height
- strideInBytes
- stride in byte-size, i.e. byte count from one line to the next.
If zero, stride is set to width * bytes-per-pixel
.
If not zero, value must be >= width * bytes-per-pixel
.stride_bytes
- stride in byte-size, i.e. byte count from one line to the next.
Must be >= src_fmt.bytesPerPixel()
* width.IllegalArgumentException
- if strideInBytes
is invalidCopyright 2010 JogAmp Community.