public class GLImage extends Object
Modifier and Type | Field and Description |
---|---|
protected static int |
SIZE_BYTE |
Constructor and Description |
---|
GLImage() |
Modifier and Type | Method and Description |
---|---|
static ByteBuffer |
allocBytes(byte[] bytearray)
Same function as in GLApp.java.
|
static byte[] |
convertARGBtoRGBA(int[] jpixels)
Convert pixels from java default ARGB int format to byte array in RGBA
format.
|
static ByteBuffer |
convertImagePixels(int[] jpixels,
int imgw,
int imgh,
boolean flipVertically)
Convert ARGB pixels to a ByteBuffer containing RGBA pixels.
|
static int[] |
flipPixels(int[] imgPixels,
int imgw,
int imgh)
Flip an array of pixels vertically
|
static ByteBuffer |
getImageAsGlByteBuffer(Image image,
int width,
int height) |
static int[] |
getImagePixels(Image image,
int width,
int height)
Return the image pixels in default Java int ARGB format.
|
static byte[] |
getRGBABytes(int[] jpixels) |
static ByteBuffer |
toByteBuffer(Image img,
int imgWidth,
int imgHeight) |
protected static final int SIZE_BYTE
public static ByteBuffer getImageAsGlByteBuffer(Image image, int width, int height)
public static int[] getImagePixels(Image image, int width, int height)
public static ByteBuffer convertImagePixels(int[] jpixels, int imgw, int imgh, boolean flipVertically)
imgFilename
- public static int[] flipPixels(int[] imgPixels, int imgw, int imgh)
imgPixels
- imgw
- imgh
- public static byte[] convertARGBtoRGBA(int[] jpixels)
jpixels
- public static byte[] getRGBABytes(int[] jpixels)
public static ByteBuffer allocBytes(byte[] bytearray)
bytearray
- public static ByteBuffer toByteBuffer(Image img, int imgWidth, int imgHeight)
Copyright © 2016. All rights reserved.