Class EXRChannelInfo

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class EXRChannelInfo extends Struct<EXRChannelInfo> implements NativeResource

 struct EXRChannelInfo {
     char name[256];
     int pixel_type;
     int x_sampling;
     int y_sampling;
     unsigned char p_linear;
     char[3];
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • NAME

      public static final int NAME
      The struct member offsets.
    • PIXEL_TYPE

      public static final int PIXEL_TYPE
      The struct member offsets.
    • X_SAMPLING

      public static final int X_SAMPLING
      The struct member offsets.
    • Y_SAMPLING

      public static final int Y_SAMPLING
      The struct member offsets.
    • P_LINEAR

      public static final int P_LINEAR
      The struct member offsets.
  • Constructor Details

    • EXRChannelInfo

      public EXRChannelInfo(ByteBuffer container)
      Creates a EXRChannelInfo instance at the current position of the specified ByteBuffer 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 Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<EXRChannelInfo>
    • name

      public ByteBuffer name()
      Returns:
      a ByteBuffer view of the name field.
    • nameString

      public String nameString()
      Returns:
      the null-terminated string stored in the name field.
    • pixel_type

      public int pixel_type()
      Returns:
      the value of the pixel_type field.
    • x_sampling

      public int x_sampling()
      Returns:
      the value of the x_sampling field.
    • y_sampling

      public int y_sampling()
      Returns:
      the value of the y_sampling field.
    • p_linear

      public byte p_linear()
      Returns:
      the value of the p_linear field.
    • name

      public EXRChannelInfo name(ByteBuffer value)
      Copies the specified encoded string to the name field.
    • pixel_type

      public EXRChannelInfo pixel_type(int value)
      Sets the specified value to the pixel_type field.
    • x_sampling

      public EXRChannelInfo x_sampling(int value)
      Sets the specified value to the x_sampling field.
    • y_sampling

      public EXRChannelInfo y_sampling(int value)
      Sets the specified value to the y_sampling field.
    • p_linear

      public EXRChannelInfo p_linear(byte value)
      Sets the specified value to the p_linear field.
    • set

      public EXRChannelInfo set(ByteBuffer name, int pixel_type, int x_sampling, int y_sampling, byte p_linear)
      Initializes this struct with the specified values.
    • set

      public EXRChannelInfo set(EXRChannelInfo src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static EXRChannelInfo malloc()
      Returns a new EXRChannelInfo instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static EXRChannelInfo calloc()
      Returns a new EXRChannelInfo instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static EXRChannelInfo create()
      Returns a new EXRChannelInfo instance allocated with BufferUtils.
    • create

      public static EXRChannelInfo create(long address)
      Returns a new EXRChannelInfo instance for the specified memory address.
    • createSafe

      public static @Nullable EXRChannelInfo createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static EXRChannelInfo.Buffer malloc(int capacity)
      Returns a new EXRChannelInfo.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static EXRChannelInfo.Buffer calloc(int capacity)
      Returns a new EXRChannelInfo.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static EXRChannelInfo.Buffer create(int capacity)
      Returns a new EXRChannelInfo.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static EXRChannelInfo.Buffer create(long address, int capacity)
      Create a EXRChannelInfo.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable EXRChannelInfo.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • mallocStack

      @Deprecated public static EXRChannelInfo mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static EXRChannelInfo callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static EXRChannelInfo mallocStack(MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static EXRChannelInfo callocStack(MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static EXRChannelInfo.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static EXRChannelInfo.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • mallocStack

      @Deprecated public static EXRChannelInfo.Buffer mallocStack(int capacity, MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static EXRChannelInfo.Buffer callocStack(int capacity, MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • malloc

      public static EXRChannelInfo malloc(MemoryStack stack)
      Returns a new EXRChannelInfo instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static EXRChannelInfo calloc(MemoryStack stack)
      Returns a new EXRChannelInfo instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static EXRChannelInfo.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new EXRChannelInfo.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static EXRChannelInfo.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new EXRChannelInfo.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nname

      public static ByteBuffer nname(long struct)
      Unsafe version of name().
    • nnameString

      public static String nnameString(long struct)
      Unsafe version of nameString().
    • npixel_type

      public static int npixel_type(long struct)
      Unsafe version of pixel_type().
    • nx_sampling

      public static int nx_sampling(long struct)
      Unsafe version of x_sampling().
    • ny_sampling

      public static int ny_sampling(long struct)
      Unsafe version of y_sampling().
    • np_linear

      public static byte np_linear(long struct)
      Unsafe version of p_linear().
    • nname

      public static void nname(long struct, ByteBuffer value)
      Unsafe version of name.
    • npixel_type

      public static void npixel_type(long struct, int value)
      Unsafe version of pixel_type.
    • nx_sampling

      public static void nx_sampling(long struct, int value)
      Unsafe version of x_sampling.
    • ny_sampling

      public static void ny_sampling(long struct, int value)
      Unsafe version of y_sampling.
    • np_linear

      public static void np_linear(long struct, byte value)
      Unsafe version of p_linear.