HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages

These are a group of functions for attributes that are required to be in every part of every file. More...

+ Collaboration diagram for Required Attribute Utililities:

Functions

EXR_EXPORT exr_result_t exr_initialize_required_attr (exr_context_t ctxt, int part_index, const exr_attr_box2i_t *displayWindow, const exr_attr_box2i_t *dataWindow, float pixelaspectratio, const exr_attr_v2f_t *screenWindowCenter, float screenWindowWidth, exr_lineorder_t lineorder, exr_compression_t ctype)
 Initialize all required attributes for all files. More...
 
EXR_EXPORT exr_result_t exr_initialize_required_attr_simple (exr_context_t ctxt, int part_index, int32_t width, int32_t height, exr_compression_t ctype)
 Initialize all required attributes to default values: More...
 
EXR_EXPORT exr_result_t exr_copy_unset_attributes (exr_context_t ctxt, int part_index, exr_const_context_t source, int src_part_index)
 Copy the attributes from one part to another. More...
 
EXR_EXPORT exr_result_t exr_get_channels (exr_const_context_t ctxt, int part_index, const exr_attr_chlist_t **chlist)
 Retrieve the list of channels. More...
 
EXR_EXPORT int exr_add_channel (exr_context_t ctxt, int part_index, const char *name, exr_pixel_type_t ptype, exr_perceptual_treatment_t percept, int32_t xsamp, int32_t ysamp)
 Define a new channel to the output file part. More...
 
EXR_EXPORT exr_result_t exr_set_channels (exr_context_t ctxt, int part_index, const exr_attr_chlist_t *channels)
 Copy the channels from another source. More...
 
EXR_EXPORT exr_result_t exr_get_compression (exr_const_context_t ctxt, int part_index, exr_compression_t *compression)
 Retrieve the compression method used for the specified part. More...
 
EXR_EXPORT exr_result_t exr_set_compression (exr_context_t ctxt, int part_index, exr_compression_t ctype)
 Set the compression method used for the specified part. More...
 
EXR_EXPORT exr_result_t exr_get_data_window (exr_const_context_t ctxt, int part_index, exr_attr_box2i_t *out)
 Retrieve the data window for the specified part. More...
 
EXR_EXPORT int exr_set_data_window (exr_context_t ctxt, int part_index, const exr_attr_box2i_t *dw)
 Set the data window for the specified part. More...
 
EXR_EXPORT exr_result_t exr_get_display_window (exr_const_context_t ctxt, int part_index, exr_attr_box2i_t *out)
 Retrieve the display window for the specified part. More...
 
EXR_EXPORT int exr_set_display_window (exr_context_t ctxt, int part_index, const exr_attr_box2i_t *dw)
 Set the display window for the specified part. More...
 
EXR_EXPORT exr_result_t exr_get_lineorder (exr_const_context_t ctxt, int part_index, exr_lineorder_t *out)
 Retrieve the line order for storing data in the specified part (use 0 for single part images). More...
 
EXR_EXPORT exr_result_t exr_set_lineorder (exr_context_t ctxt, int part_index, exr_lineorder_t lo)
 Set the line order for storing data in the specified part (use 0 for single part images). More...
 
EXR_EXPORT exr_result_t exr_get_pixel_aspect_ratio (exr_const_context_t ctxt, int part_index, float *par)
 Retrieve the pixel aspect ratio for the specified part (use 0 for single part images). More...
 
EXR_EXPORT exr_result_t exr_set_pixel_aspect_ratio (exr_context_t ctxt, int part_index, float par)
 Set the pixel aspect ratio for the specified part (use 0 for single part images). More...
 
EXR_EXPORT exr_result_t exr_get_screen_window_center (exr_const_context_t ctxt, int part_index, exr_attr_v2f_t *wc)
 Retrieve the screen oriented window center for the specified part (use 0 for single part images). More...
 
EXR_EXPORT int exr_set_screen_window_center (exr_context_t ctxt, int part_index, const exr_attr_v2f_t *wc)
 Set the screen oriented window center for the specified part (use 0 for single part images). More...
 
EXR_EXPORT exr_result_t exr_get_screen_window_width (exr_const_context_t ctxt, int part_index, float *out)
 Retrieve the screen oriented window width for the specified part (use 0 for single part images). More...
 
EXR_EXPORT exr_result_t exr_set_screen_window_width (exr_context_t ctxt, int part_index, float ssw)
 Set the screen oriented window width for the specified part (use 0 for single part images). More...
 
EXR_EXPORT exr_result_t exr_get_tile_descriptor (exr_const_context_t ctxt, int part_index, uint32_t *xsize, uint32_t *ysize, exr_tile_level_mode_t *level, exr_tile_round_mode_t *round)
 Retrieve the tiling info for a tiled part (use 0 for single part images). More...
 
EXR_EXPORT exr_result_t exr_set_tile_descriptor (exr_context_t ctxt, int part_index, uint32_t x_size, uint32_t y_size, exr_tile_level_mode_t level_mode, exr_tile_round_mode_t round_mode)
 Set the tiling info for a tiled part (use 0 for single part images). More...
 
EXR_EXPORT exr_result_t exr_set_name (exr_context_t ctxt, int part_index, const char *val)
 
EXR_EXPORT exr_result_t exr_get_version (exr_const_context_t ctxt, int part_index, int32_t *out)
 
EXR_EXPORT exr_result_t exr_set_version (exr_context_t ctxt, int part_index, int32_t val)
 
EXR_EXPORT exr_result_t exr_set_chunk_count (exr_context_t ctxt, int part_index, int32_t val)
 

Detailed Description

These are a group of functions for attributes that are required to be in every part of every file.

Function Documentation

EXR_EXPORT int exr_add_channel ( exr_context_t  ctxt,
int  part_index,
const char *  name,
exr_pixel_type_t  ptype,
exr_perceptual_treatment_t  percept,
int32_t  xsamp,
int32_t  ysamp 
)

Define a new channel to the output file part.

The percept parameter is used for lossy compression techniques to indicate that the value represented is closer to linear (1) or closer to logarithmic (0). For r, g, b, luminance, this is normally 0.

EXR_EXPORT exr_result_t exr_copy_unset_attributes ( exr_context_t  ctxt,
int  part_index,
exr_const_context_t  source,
int  src_part_index 
)

Copy the attributes from one part to another.

This allows one to quickly unassigned attributes from one source to another.

If an attribute in the source part has not been yet set in the destination part, the item will be copied over.

For example, when you add a part, the storage type and name attributes are required arguments to the definition of a new part, but channels has not yet been assigned. So by calling this with an input file as the source, you can copy the channel definitions (and any other unassigned attributes from the source).

EXR_EXPORT exr_result_t exr_get_channels ( exr_const_context_t  ctxt,
int  part_index,
const exr_attr_chlist_t **  chlist 
)

Retrieve the list of channels.

EXR_EXPORT exr_result_t exr_get_compression ( exr_const_context_t  ctxt,
int  part_index,
exr_compression_t compression 
)

Retrieve the compression method used for the specified part.

EXR_EXPORT exr_result_t exr_get_data_window ( exr_const_context_t  ctxt,
int  part_index,
exr_attr_box2i_t out 
)

Retrieve the data window for the specified part.

EXR_EXPORT exr_result_t exr_get_display_window ( exr_const_context_t  ctxt,
int  part_index,
exr_attr_box2i_t out 
)

Retrieve the display window for the specified part.

EXR_EXPORT exr_result_t exr_get_lineorder ( exr_const_context_t  ctxt,
int  part_index,
exr_lineorder_t out 
)

Retrieve the line order for storing data in the specified part (use 0 for single part images).

EXR_EXPORT exr_result_t exr_get_pixel_aspect_ratio ( exr_const_context_t  ctxt,
int  part_index,
float par 
)

Retrieve the pixel aspect ratio for the specified part (use 0 for single part images).

EXR_EXPORT exr_result_t exr_get_screen_window_center ( exr_const_context_t  ctxt,
int  part_index,
exr_attr_v2f_t wc 
)

Retrieve the screen oriented window center for the specified part (use 0 for single part images).

EXR_EXPORT exr_result_t exr_get_screen_window_width ( exr_const_context_t  ctxt,
int  part_index,
float out 
)

Retrieve the screen oriented window width for the specified part (use 0 for single part images).

EXR_EXPORT exr_result_t exr_get_tile_descriptor ( exr_const_context_t  ctxt,
int  part_index,
uint32_t *  xsize,
uint32_t *  ysize,
exr_tile_level_mode_t level,
exr_tile_round_mode_t round 
)

Retrieve the tiling info for a tiled part (use 0 for single part images).

EXR_EXPORT exr_result_t exr_get_version ( exr_const_context_t  ctxt,
int  part_index,
int32_t *  out 
)
EXR_EXPORT exr_result_t exr_initialize_required_attr ( exr_context_t  ctxt,
int  part_index,
const exr_attr_box2i_t displayWindow,
const exr_attr_box2i_t dataWindow,
float  pixelaspectratio,
const exr_attr_v2f_t screenWindowCenter,
float  screenWindowWidth,
exr_lineorder_t  lineorder,
exr_compression_t  ctype 
)

Initialize all required attributes for all files.

NB: other file types do require other attributes, such as the tile description for a tiled file.

EXR_EXPORT exr_result_t exr_initialize_required_attr_simple ( exr_context_t  ctxt,
int  part_index,
int32_t  width,
int32_t  height,
exr_compression_t  ctype 
)

Initialize all required attributes to default values:

  • displayWindow is set to (0, 0 -> width - 1, height - 1)
  • dataWindow is set to (0, 0 -> width - 1, height - 1)
  • pixelAspectRatio is set to 1.0
  • screenWindowCenter is set to 0.f, 0.f
  • screenWindowWidth is set to 1.f
  • lineorder is set to INCREASING_Y
  • compression is set to ctype
EXR_EXPORT exr_result_t exr_set_channels ( exr_context_t  ctxt,
int  part_index,
const exr_attr_chlist_t channels 
)

Copy the channels from another source.

Useful if you are manually constructing the list or simply copying from an input file.

EXR_EXPORT exr_result_t exr_set_chunk_count ( exr_context_t  ctxt,
int  part_index,
int32_t  val 
)
EXR_EXPORT exr_result_t exr_set_compression ( exr_context_t  ctxt,
int  part_index,
exr_compression_t  ctype 
)

Set the compression method used for the specified part.

EXR_EXPORT int exr_set_data_window ( exr_context_t  ctxt,
int  part_index,
const exr_attr_box2i_t dw 
)

Set the data window for the specified part.

EXR_EXPORT int exr_set_display_window ( exr_context_t  ctxt,
int  part_index,
const exr_attr_box2i_t dw 
)

Set the display window for the specified part.

EXR_EXPORT exr_result_t exr_set_lineorder ( exr_context_t  ctxt,
int  part_index,
exr_lineorder_t  lo 
)

Set the line order for storing data in the specified part (use 0 for single part images).

EXR_EXPORT exr_result_t exr_set_name ( exr_context_t  ctxt,
int  part_index,
const char *  val 
)
EXR_EXPORT exr_result_t exr_set_pixel_aspect_ratio ( exr_context_t  ctxt,
int  part_index,
float  par 
)

Set the pixel aspect ratio for the specified part (use 0 for single part images).

EXR_EXPORT int exr_set_screen_window_center ( exr_context_t  ctxt,
int  part_index,
const exr_attr_v2f_t wc 
)

Set the screen oriented window center for the specified part (use 0 for single part images).

EXR_EXPORT exr_result_t exr_set_screen_window_width ( exr_context_t  ctxt,
int  part_index,
float  ssw 
)

Set the screen oriented window width for the specified part (use 0 for single part images).

EXR_EXPORT exr_result_t exr_set_tile_descriptor ( exr_context_t  ctxt,
int  part_index,
uint32_t  x_size,
uint32_t  y_size,
exr_tile_level_mode_t  level_mode,
exr_tile_round_mode_t  round_mode 
)

Set the tiling info for a tiled part (use 0 for single part images).

EXR_EXPORT exr_result_t exr_set_version ( exr_context_t  ctxt,
int  part_index,
int32_t  val 
)