HDK
|
Struct used to pass function pointers into the context initialization routines. More...
#include <openexr_context.h>
Public Attributes | |
size_t | size |
Size member to tag initializer for version stability. More... | |
exr_error_handler_cb_t | error_handler_fn |
Error callback function pointer. More... | |
exr_memory_allocation_func_t | alloc_fn |
exr_memory_free_func_t | free_fn |
void * | user_data |
exr_read_func_ptr_t | read_fn |
Custom read routine. More... | |
exr_query_size_func_ptr_t | size_fn |
Custom size query routine. More... | |
exr_write_func_ptr_t | write_fn |
Custom write routine. More... | |
exr_destroy_stream_func_ptr_t | destroy_fn |
Optional function to destroy the user data block of a custom stream. More... | |
int | max_image_width |
int | max_image_height |
int | max_tile_width |
int | max_tile_height |
int | zip_level |
float | dwa_quality |
int | flags |
uint8_t | pad [4] |
Struct used to pass function pointers into the context initialization routines.
This partly exists to avoid the chicken and egg issue around creating the storage needed for the context on systems which want to override the malloc/free routines.
However, it also serves to make a tidier/simpler set of functions to create and start processing exr files.
The size member is required for version portability.
It can be initialized using EXR_DEFAULT_CONTEXT_INITIALIZER
.
Definition at line 190 of file openexr_context.h.
exr_memory_allocation_func_t _exr_context_initializer_v3::alloc_fn |
Custom allocator, if NULL
, will use malloc.
Definition at line 210 of file openexr_context.h.
exr_destroy_stream_func_ptr_t _exr_context_initializer_v3::destroy_fn |
Optional function to destroy the user data block of a custom stream.
Allows one to free any user allocated data, and close any handles.
Definition at line 281 of file openexr_context.h.
float _exr_context_initializer_v3::dwa_quality |
Initialize the default dwa compression quality. See exr_set_default_dwa_compression_quality() to set the default for all contexts.
Definition at line 317 of file openexr_context.h.
exr_error_handler_cb_t _exr_context_initializer_v3::error_handler_fn |
Error callback function pointer.
The error callback is allowed to be NULL
, and will use a default print which outputs to stderr
.
Definition at line 207 of file openexr_context.h.
int _exr_context_initializer_v3::flags |
Initialize with a bitwise or of the various context flags
Definition at line 321 of file openexr_context.h.
exr_memory_free_func_t _exr_context_initializer_v3::free_fn |
Custom deallocator, if NULL
, will use free.
Definition at line 213 of file openexr_context.h.
int _exr_context_initializer_v3::max_image_height |
Initialize a field specifying what the maximum image height allowed by the context is. See exr_set_default_maximum_image_size() to understand how this interacts with global defaults.
Definition at line 293 of file openexr_context.h.
int _exr_context_initializer_v3::max_image_width |
Initialize a field specifying what the maximum image width allowed by the context is. See exr_set_default_maximum_image_size() to understand how this interacts with global defaults.
Definition at line 287 of file openexr_context.h.
int _exr_context_initializer_v3::max_tile_height |
Initialize a field specifying what the maximum tile height allowed by the context is. See exr_set_default_maximum_tile_size() to understand how this interacts with global defaults.
Definition at line 305 of file openexr_context.h.
int _exr_context_initializer_v3::max_tile_width |
Initialize a field specifying what the maximum tile width allowed by the context is. See exr_set_default_maximum_tile_size() to understand how this interacts with global defaults.
Definition at line 299 of file openexr_context.h.
uint8_t _exr_context_initializer_v3::pad[4] |
Definition at line 323 of file openexr_context.h.
exr_read_func_ptr_t _exr_context_initializer_v3::read_fn |
Custom read routine.
This is only used during read or update contexts. If this is provided, it is expected that the caller has previously made the stream available, and placed whatever stream/file data into user_data
above.
If this is NULL
, and the context requested is for reading an exr file, an internal implementation is provided for reading from normal filesystem files, and the filename provided is attempted to be opened as such.
Expected to be NULL
for a write-only operation, but is ignored if it is provided.
For update contexts, both read and write functions must be provided if either is.
Definition at line 240 of file openexr_context.h.
size_t _exr_context_initializer_v3::size |
Size member to tag initializer for version stability.
This should be initialized to the size of the current structure. This allows EXR to add functions or other initializers in the future, and retain version compatibility
Definition at line 198 of file openexr_context.h.
exr_query_size_func_ptr_t _exr_context_initializer_v3::size_fn |
Custom size query routine.
Used to provide validation when reading header values. If this is not provided, but a custom read routine is provided, this will disable some of the validation checks when parsing the image header.
Expected to be NULL
for a write-only operation, but is ignored if it is provided.
Definition at line 254 of file openexr_context.h.
void* _exr_context_initializer_v3::user_data |
Blind data passed to custom read, size, write, destroy functions below. Up to user to manage this pointer.
Definition at line 218 of file openexr_context.h.
exr_write_func_ptr_t _exr_context_initializer_v3::write_fn |
Custom write routine.
This is only used during write or update contexts. If this is provided, it is expected that the caller has previously made the stream available, and placed whatever stream/file data into user_data
above.
If this is NULL
, and the context requested is for writing an exr file, an internal implementation is provided for reading from normal filesystem files, and the filename provided is attempted to be opened as such.
For update contexts, both read and write functions must be provided if either is.
Definition at line 273 of file openexr_context.h.
int _exr_context_initializer_v3::zip_level |
Initialize a field specifying what the default zip compression level should be for this context. See exr_set_default_zip_compresion_level() to set it for all contexts.
Definition at line 311 of file openexr_context.h.