Package org.lwjgl.util.tinyexr
Class EXRImage
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.tinyexr.EXRImage
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class EXRImage extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Member documentation
tiles
– tiled pixel data. The application must reconstruct image from tiles manually.NULL
if scanline format.images
–image[channels][pixels]
.NULL
if tiled format.
Layout
struct EXRImage {
EXRTile
* tiles; unsigned char ** images; int width; int height; int num_channels; int num_tiles; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EXRImage.Buffer
An array ofEXRImage
structs.
-
Constructor Summary
Constructors Constructor Description EXRImage(java.nio.ByteBuffer container)
Creates aEXRImage
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EXRImage
calloc()
Returns a newEXRImage
instance allocated withmemCalloc
.static EXRImage.Buffer
calloc(int capacity)
Returns a newEXRImage.Buffer
instance allocated withmemCalloc
.static EXRImage
callocStack()
Returns a newEXRImage
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static EXRImage.Buffer
callocStack(int capacity)
Returns a newEXRImage.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static EXRImage.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newEXRImage.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static EXRImage
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newEXRImage
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static EXRImage
create()
Returns a newEXRImage
instance allocated withBufferUtils
.static EXRImage.Buffer
create(int capacity)
Returns a newEXRImage.Buffer
instance allocated withBufferUtils
.static EXRImage
create(long address)
Returns a newEXRImage
instance for the specified memory address.static EXRImage.Buffer
create(long address, int capacity)
Create aEXRImage.Buffer
instance at the specified memory.static EXRImage
createSafe(long address)
static EXRImage.Buffer
createSafe(long address, int capacity)
int
height()
Returns the value of theheight
field.EXRImage
height(int value)
Sets the specified value to theheight
field.org.lwjgl.PointerBuffer
images()
Returns aPointerBuffer
view of the data pointed to by theimages
field.EXRImage
images(org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to theimages
field.static EXRImage
malloc()
Returns a newEXRImage
instance allocated withmemAlloc
.static EXRImage.Buffer
malloc(int capacity)
Returns a newEXRImage.Buffer
instance allocated withmemAlloc
.static EXRImage
mallocStack()
Returns a newEXRImage
instance allocated on the thread-localMemoryStack
.static EXRImage.Buffer
mallocStack(int capacity)
Returns a newEXRImage.Buffer
instance allocated on the thread-localMemoryStack
.static EXRImage.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newEXRImage.Buffer
instance allocated on the specifiedMemoryStack
.static EXRImage
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newEXRImage
instance allocated on the specifiedMemoryStack
.static int
nheight(long struct)
Unsafe version ofheight()
.static void
nheight(long struct, int value)
Unsafe version ofheight
.static org.lwjgl.PointerBuffer
nimages(long struct)
Unsafe version ofimages
.static void
nimages(long struct, org.lwjgl.PointerBuffer value)
Unsafe version ofimages
.static int
nnum_channels(long struct)
Unsafe version ofnum_channels()
.static void
nnum_channels(long struct, int value)
Sets the specified value to thenum_channels
field of the specifiedstruct
.static int
nnum_tiles(long struct)
Unsafe version ofnum_tiles()
.static void
nnum_tiles(long struct, int value)
Sets the specified value to thenum_tiles
field of the specifiedstruct
.static EXRTile.Buffer
ntiles(long struct)
Unsafe version oftiles()
.static void
ntiles(long struct, EXRTile.Buffer value)
Unsafe version oftiles
.int
num_channels()
Returns the value of thenum_channels
field.EXRImage
num_channels(int value)
Sets the specified value to thenum_channels
field.int
num_tiles()
Returns the value of thenum_tiles
field.static int
nwidth(long struct)
Unsafe version ofwidth()
.static void
nwidth(long struct, int value)
Unsafe version ofwidth
.EXRImage
set(EXRImage src)
Copies the specified struct data to this struct.EXRImage
set(EXRTile.Buffer tiles, org.lwjgl.PointerBuffer images, int width, int height, int num_channels)
Initializes this struct with the specified values.int
sizeof()
EXRTile.Buffer
tiles()
Returns aEXRTile.Buffer
view of the struct array pointed to by thetiles
field.EXRImage
tiles(EXRTile.Buffer value)
Sets the address of the specifiedEXRTile.Buffer
to thetiles
field.static void
validate(long struct)
Validates pointer members that should not beNULL
.static void
validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.int
width()
Returns the value of thewidth
field.EXRImage
width(int value)
Sets the specified value to thewidth
field.
-
-
-
Constructor Detail
-
EXRImage
public EXRImage(java.nio.ByteBuffer container)
Creates aEXRImage
instance at the current position of the specifiedByteBuffer
container. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
tiles
@Nullable public EXRTile.Buffer tiles()
Returns aEXRTile.Buffer
view of the struct array pointed to by thetiles
field.
-
images
@Nullable public org.lwjgl.PointerBuffer images()
Returns aPointerBuffer
view of the data pointed to by theimages
field.
-
width
public int width()
Returns the value of thewidth
field.
-
height
public int height()
Returns the value of theheight
field.
-
num_channels
public int num_channels()
Returns the value of thenum_channels
field.
-
num_tiles
public int num_tiles()
Returns the value of thenum_tiles
field.
-
tiles
public EXRImage tiles(@Nullable EXRTile.Buffer value)
Sets the address of the specifiedEXRTile.Buffer
to thetiles
field.
-
images
public EXRImage images(@Nullable org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to theimages
field.
-
width
public EXRImage width(int value)
Sets the specified value to thewidth
field.
-
height
public EXRImage height(int value)
Sets the specified value to theheight
field.
-
num_channels
public EXRImage num_channels(int value)
Sets the specified value to thenum_channels
field.
-
set
public EXRImage set(@Nullable EXRTile.Buffer tiles, @Nullable org.lwjgl.PointerBuffer images, int width, int height, int num_channels)
Initializes this struct with the specified values.
-
set
public EXRImage set(EXRImage src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static EXRImage malloc()
Returns a newEXRImage
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static EXRImage calloc()
Returns a newEXRImage
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static EXRImage create()
Returns a newEXRImage
instance allocated withBufferUtils
.
-
create
public static EXRImage create(long address)
Returns a newEXRImage
instance for the specified memory address.
-
createSafe
@Nullable public static EXRImage createSafe(long address)
-
malloc
public static EXRImage.Buffer malloc(int capacity)
Returns a newEXRImage.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static EXRImage.Buffer calloc(int capacity)
Returns a newEXRImage.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static EXRImage.Buffer create(int capacity)
Returns a newEXRImage.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static EXRImage.Buffer create(long address, int capacity)
Create aEXRImage.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static EXRImage.Buffer createSafe(long address, int capacity)
-
mallocStack
public static EXRImage mallocStack()
Returns a newEXRImage
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static EXRImage callocStack()
Returns a newEXRImage
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static EXRImage mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newEXRImage
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static EXRImage callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newEXRImage
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static EXRImage.Buffer mallocStack(int capacity)
Returns a newEXRImage.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static EXRImage.Buffer callocStack(int capacity)
Returns a newEXRImage.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static EXRImage.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newEXRImage.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static EXRImage.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newEXRImage.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
ntiles
@Nullable public static EXRTile.Buffer ntiles(long struct)
Unsafe version oftiles()
.
-
nimages
@Nullable public static org.lwjgl.PointerBuffer nimages(long struct)
Unsafe version ofimages
.
-
nwidth
public static int nwidth(long struct)
Unsafe version ofwidth()
.
-
nheight
public static int nheight(long struct)
Unsafe version ofheight()
.
-
nnum_channels
public static int nnum_channels(long struct)
Unsafe version ofnum_channels()
.
-
nnum_tiles
public static int nnum_tiles(long struct)
Unsafe version ofnum_tiles()
.
-
ntiles
public static void ntiles(long struct, @Nullable EXRTile.Buffer value)
Unsafe version oftiles
.
-
nimages
public static void nimages(long struct, @Nullable org.lwjgl.PointerBuffer value)
Unsafe version ofimages
.
-
nwidth
public static void nwidth(long struct, int value)
Unsafe version ofwidth
.
-
nheight
public static void nheight(long struct, int value)
Unsafe version ofheight
.
-
nnum_channels
public static void nnum_channels(long struct, int value)
Sets the specified value to thenum_channels
field of the specifiedstruct
.
-
nnum_tiles
public static void nnum_tiles(long struct, int value)
Sets the specified value to thenum_tiles
field of the specifiedstruct
.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-
validate
public static void validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.- Parameters:
array
- the struct array to validatecount
- the number of structs inarray
-
-