Class EXRHeader

  • All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer

    public class EXRHeader
    extends Struct
    implements NativeResource

    Member documentation

    • num_custom_attributes – number of EXRAttribute in the custom_attributes array
    • custom_attributes – custom attributes (excludes required attributes, e.g. `channels`, `compression`, etc)
    • pixel_types – loaded pixel type (TINYEXR_PIXELTYPE_*) of images for each channel. This is overwritten with requested_pixel_types when loading.
    • compression_type – compression type (TINYEXR_COMPRESSIONTYPE_*)
    • requested_pixel_types – filled initially by ParseEXRHeaderFrom(Memory|File), then users can edit it (only valid for HALF pixel type channel)

    Layout

    
     struct EXRHeader {
         float pixel_aspect_ratio;
         int line_order;
         int data_window[4];
         int display_window[4];
         float screen_window_center[2];
         float screen_window_width;
         int chunk_count;
         int tiled;
         int tile_size_x;
         int tile_size_y;
         int tile_level_mode;
         int tile_rounding_mode;
         int long_name;
         int non_image;
         int multipart;
         unsigned int header_len;
         int num_custom_attributes;
         EXRAttribute * custom_attributes;
         EXRChannelInfo * channels;
         int * pixel_types;
         int num_channels;
         int compression_type;
         int * requested_pixel_types;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • PIXEL_ASPECT_RATIO, LINE_ORDER, DATA_WINDOW, DISPLAY_WINDOW, SCREEN_WINDOW_CENTER, SCREEN_WINDOW_WIDTH, CHUNK_COUNT, TILED, TILE_SIZE_X, TILE_SIZE_Y, TILE_LEVEL_MODE, TILE_ROUNDING_MODE, LONG_NAME, NON_IMAGE, MULTIPART, HEADER_LEN, NUM_CUSTOM_ATTRIBUTES, CUSTOM_ATTRIBUTES, CHANNELS, PIXEL_TYPES, NUM_CHANNELS, COMPRESSION_TYPE, REQUESTED_PIXEL_TYPES

        The struct member offsets.
    • Constructor Detail

      • EXRHeader

        public EXRHeader​(java.nio.ByteBuffer container)
        Creates a EXRHeader 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 Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • pixel_aspect_ratio

        public float pixel_aspect_ratio()
        Returns the value of the pixel_aspect_ratio field.
      • line_order

        public int line_order()
        Returns the value of the line_order field.
      • data_window

        public java.nio.IntBuffer data_window()
        Returns a IntBuffer view of the data_window field.
      • data_window

        public int data_window​(int index)
        Returns the value at the specified index of the data_window field.
      • display_window

        public java.nio.IntBuffer display_window()
        Returns a IntBuffer view of the display_window field.
      • display_window

        public int display_window​(int index)
        Returns the value at the specified index of the display_window field.
      • screen_window_center

        public java.nio.FloatBuffer screen_window_center()
        Returns a FloatBuffer view of the screen_window_center field.
      • screen_window_center

        public float screen_window_center​(int index)
        Returns the value at the specified index of the screen_window_center field.
      • screen_window_width

        public float screen_window_width()
        Returns the value of the screen_window_width field.
      • chunk_count

        public int chunk_count()
        Returns the value of the chunk_count field.
      • tiled

        public boolean tiled()
        Returns the value of the tiled field.
      • tile_size_x

        public int tile_size_x()
        Returns the value of the tile_size_x field.
      • tile_size_y

        public int tile_size_y()
        Returns the value of the tile_size_y field.
      • tile_level_mode

        public int tile_level_mode()
        Returns the value of the tile_level_mode field.
      • tile_rounding_mode

        public int tile_rounding_mode()
        Returns the value of the tile_rounding_mode field.
      • long_name

        public boolean long_name()
        Returns the value of the long_name field.
      • non_image

        public boolean non_image()
        Returns the value of the non_image field.
      • multipart

        public boolean multipart()
        Returns the value of the multipart field.
      • header_len

        public int header_len()
        Returns the value of the header_len field.
      • num_custom_attributes

        public int num_custom_attributes()
        Returns the value of the num_custom_attributes field.
      • pixel_types

        public java.nio.IntBuffer pixel_types()
        Returns a IntBuffer view of the data pointed to by the pixel_types field.
      • num_channels

        public int num_channels()
        Returns the value of the num_channels field.
      • compression_type

        public int compression_type()
        Returns the value of the compression_type field.
      • requested_pixel_types

        public java.nio.IntBuffer requested_pixel_types()
        Returns a IntBuffer view of the data pointed to by the requested_pixel_types field.
      • pixel_aspect_ratio

        public EXRHeader pixel_aspect_ratio​(float value)
        Sets the specified value to the pixel_aspect_ratio field.
      • line_order

        public EXRHeader line_order​(int value)
        Sets the specified value to the line_order field.
      • data_window

        public EXRHeader data_window​(java.nio.IntBuffer value)
        Copies the specified IntBuffer to the data_window field.
      • data_window

        public EXRHeader data_window​(int index,
                                     int value)
        Sets the specified value at the specified index of the data_window field.
      • display_window

        public EXRHeader display_window​(java.nio.IntBuffer value)
        Copies the specified IntBuffer to the display_window field.
      • display_window

        public EXRHeader display_window​(int index,
                                        int value)
        Sets the specified value at the specified index of the display_window field.
      • screen_window_center

        public EXRHeader screen_window_center​(java.nio.FloatBuffer value)
        Copies the specified FloatBuffer to the screen_window_center field.
      • screen_window_center

        public EXRHeader screen_window_center​(int index,
                                              float value)
        Sets the specified value at the specified index of the screen_window_center field.
      • screen_window_width

        public EXRHeader screen_window_width​(float value)
        Sets the specified value to the screen_window_width field.
      • chunk_count

        public EXRHeader chunk_count​(int value)
        Sets the specified value to the chunk_count field.
      • tiled

        public EXRHeader tiled​(boolean value)
        Sets the specified value to the tiled field.
      • tile_size_x

        public EXRHeader tile_size_x​(int value)
        Sets the specified value to the tile_size_x field.
      • tile_size_y

        public EXRHeader tile_size_y​(int value)
        Sets the specified value to the tile_size_y field.
      • tile_level_mode

        public EXRHeader tile_level_mode​(int value)
        Sets the specified value to the tile_level_mode field.
      • tile_rounding_mode

        public EXRHeader tile_rounding_mode​(int value)
        Sets the specified value to the tile_rounding_mode field.
      • long_name

        public EXRHeader long_name​(boolean value)
        Sets the specified value to the long_name field.
      • non_image

        public EXRHeader non_image​(boolean value)
        Sets the specified value to the non_image field.
      • multipart

        public EXRHeader multipart​(boolean value)
        Sets the specified value to the multipart field.
      • header_len

        public EXRHeader header_len​(int value)
        Sets the specified value to the header_len field.
      • num_custom_attributes

        public EXRHeader num_custom_attributes​(int value)
        Sets the specified value to the num_custom_attributes field.
      • pixel_types

        public EXRHeader pixel_types​(java.nio.IntBuffer value)
        Sets the address of the specified IntBuffer to the pixel_types field.
      • num_channels

        public EXRHeader num_channels​(int value)
        Sets the specified value to the num_channels field.
      • compression_type

        public EXRHeader compression_type​(int value)
        Sets the specified value to the compression_type field.
      • requested_pixel_types

        public EXRHeader requested_pixel_types​(java.nio.IntBuffer value)
        Sets the address of the specified IntBuffer to the requested_pixel_types field.
      • set

        public EXRHeader set​(float pixel_aspect_ratio,
                             int line_order,
                             java.nio.IntBuffer data_window,
                             java.nio.IntBuffer display_window,
                             java.nio.FloatBuffer screen_window_center,
                             float screen_window_width,
                             int chunk_count,
                             boolean tiled,
                             int tile_size_x,
                             int tile_size_y,
                             int tile_level_mode,
                             int tile_rounding_mode,
                             boolean long_name,
                             boolean non_image,
                             boolean multipart,
                             int header_len,
                             int num_custom_attributes,
                             @Nullable
                             EXRAttribute.Buffer custom_attributes,
                             EXRChannelInfo.Buffer channels,
                             java.nio.IntBuffer pixel_types,
                             int num_channels,
                             int compression_type,
                             java.nio.IntBuffer requested_pixel_types)
        Initializes this struct with the specified values.
      • set

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

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

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

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

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

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

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

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

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

        public static EXRHeader callocStack()
        Returns a new EXRHeader instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static EXRHeader mallocStack​(MemoryStack stack)
        Returns a new EXRHeader instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

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

        public static EXRHeader.Buffer callocStack​(int capacity)
        Returns a new EXRHeader.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
        Parameters:
        capacity - the buffer capacity
      • callocStack

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

        public static float npixel_aspect_ratio​(long struct)
        Unsafe version of pixel_aspect_ratio().
      • nline_order

        public static int nline_order​(long struct)
        Unsafe version of line_order().
      • ndata_window

        public static java.nio.IntBuffer ndata_window​(long struct)
        Unsafe version of data_window().
      • ndata_window

        public static int ndata_window​(long struct,
                                       int index)
        Unsafe version of data_window.
      • ndisplay_window

        public static java.nio.IntBuffer ndisplay_window​(long struct)
        Unsafe version of display_window().
      • ndisplay_window

        public static int ndisplay_window​(long struct,
                                          int index)
        Unsafe version of display_window.
      • nscreen_window_center

        public static java.nio.FloatBuffer nscreen_window_center​(long struct)
        Unsafe version of screen_window_center().
      • nscreen_window_center

        public static float nscreen_window_center​(long struct,
                                                  int index)
        Unsafe version of screen_window_center.
      • nscreen_window_width

        public static float nscreen_window_width​(long struct)
        Unsafe version of screen_window_width().
      • nchunk_count

        public static int nchunk_count​(long struct)
        Unsafe version of chunk_count().
      • ntiled

        public static int ntiled​(long struct)
        Unsafe version of tiled().
      • ntile_size_x

        public static int ntile_size_x​(long struct)
        Unsafe version of tile_size_x().
      • ntile_size_y

        public static int ntile_size_y​(long struct)
        Unsafe version of tile_size_y().
      • ntile_level_mode

        public static int ntile_level_mode​(long struct)
        Unsafe version of tile_level_mode().
      • ntile_rounding_mode

        public static int ntile_rounding_mode​(long struct)
        Unsafe version of tile_rounding_mode().
      • nlong_name

        public static int nlong_name​(long struct)
        Unsafe version of long_name().
      • nnon_image

        public static int nnon_image​(long struct)
        Unsafe version of non_image().
      • nmultipart

        public static int nmultipart​(long struct)
        Unsafe version of multipart().
      • nheader_len

        public static int nheader_len​(long struct)
        Unsafe version of header_len().
      • nnum_custom_attributes

        public static int nnum_custom_attributes​(long struct)
        Unsafe version of num_custom_attributes().
      • npixel_types

        public static java.nio.IntBuffer npixel_types​(long struct)
        Unsafe version of pixel_types.
      • nnum_channels

        public static int nnum_channels​(long struct)
        Unsafe version of num_channels().
      • ncompression_type

        public static int ncompression_type​(long struct)
        Unsafe version of compression_type().
      • nrequested_pixel_types

        public static java.nio.IntBuffer nrequested_pixel_types​(long struct)
        Unsafe version of requested_pixel_types.
      • npixel_aspect_ratio

        public static void npixel_aspect_ratio​(long struct,
                                               float value)
        Unsafe version of pixel_aspect_ratio.
      • nline_order

        public static void nline_order​(long struct,
                                       int value)
        Unsafe version of line_order.
      • ndata_window

        public static void ndata_window​(long struct,
                                        java.nio.IntBuffer value)
        Unsafe version of data_window.
      • ndata_window

        public static void ndata_window​(long struct,
                                        int index,
                                        int value)
        Unsafe version of data_window.
      • ndisplay_window

        public static void ndisplay_window​(long struct,
                                           java.nio.IntBuffer value)
        Unsafe version of display_window.
      • ndisplay_window

        public static void ndisplay_window​(long struct,
                                           int index,
                                           int value)
        Unsafe version of display_window.
      • nscreen_window_center

        public static void nscreen_window_center​(long struct,
                                                 java.nio.FloatBuffer value)
        Unsafe version of screen_window_center.
      • nscreen_window_center

        public static void nscreen_window_center​(long struct,
                                                 int index,
                                                 float value)
        Unsafe version of screen_window_center.
      • nscreen_window_width

        public static void nscreen_window_width​(long struct,
                                                float value)
        Unsafe version of screen_window_width.
      • nchunk_count

        public static void nchunk_count​(long struct,
                                        int value)
        Unsafe version of chunk_count.
      • ntiled

        public static void ntiled​(long struct,
                                  int value)
        Unsafe version of tiled.
      • ntile_size_x

        public static void ntile_size_x​(long struct,
                                        int value)
        Unsafe version of tile_size_x.
      • ntile_size_y

        public static void ntile_size_y​(long struct,
                                        int value)
        Unsafe version of tile_size_y.
      • ntile_level_mode

        public static void ntile_level_mode​(long struct,
                                            int value)
        Unsafe version of tile_level_mode.
      • ntile_rounding_mode

        public static void ntile_rounding_mode​(long struct,
                                               int value)
        Unsafe version of tile_rounding_mode.
      • nlong_name

        public static void nlong_name​(long struct,
                                      int value)
        Unsafe version of long_name.
      • nnon_image

        public static void nnon_image​(long struct,
                                      int value)
        Unsafe version of non_image.
      • nmultipart

        public static void nmultipart​(long struct,
                                      int value)
        Unsafe version of multipart.
      • nheader_len

        public static void nheader_len​(long struct,
                                       int value)
        Unsafe version of header_len.
      • nnum_custom_attributes

        public static void nnum_custom_attributes​(long struct,
                                                  int value)
        Sets the specified value to the num_custom_attributes field of the specified struct.
      • npixel_types

        public static void npixel_types​(long struct,
                                        java.nio.IntBuffer value)
        Unsafe version of pixel_types.
      • nnum_channels

        public static void nnum_channels​(long struct,
                                         int value)
        Sets the specified value to the num_channels field of the specified struct.
      • ncompression_type

        public static void ncompression_type​(long struct,
                                             int value)
        Unsafe version of compression_type.
      • nrequested_pixel_types

        public static void nrequested_pixel_types​(long struct,
                                                  java.nio.IntBuffer value)
        Unsafe version of requested_pixel_types.
      • validate

        public static void validate​(long struct)
        Validates pointer members that should not be NULL.
        Parameters:
        struct - the struct to validate
      • validate

        public static void validate​(long array,
                                    int count)
        Calls validate(long) for each struct contained in the specified struct array.
        Parameters:
        array - the struct array to validate
        count - the number of structs in array