exr_attrs {picohdr}R Documentation

Helper function to create attributes for write_exr()

Description

The EXR file specification requires particular types to define the metadata for the image. This function helps define these metadata attributes.

Usage

exr_attrs(
  channels = NULL,
  compression = NULL,
  dataWindow = NULL,
  displayWindow = NULL,
  lineOrder = NULL,
  pixelAspectRatio = NULL,
  screenWindowCenter = NULL,
  screenWindowWidth = NULL,
  ...
)

Arguments

channels

[exr_type$chlist()] data.frame of channel information with columns name [string], type ['half', 'float', 'uint'], pLinear [0, 1], xSampling [0, 1], ySampling [0, 1]

compression

[exr_type$compression()] 'NONE' or 'ZIP'

dataWindow

[exr_type$box2i()] xmin, ymin, xmax, ymax of data. Default: image size c(0, 0, w-1, h-1)

displayWindow

[exr_type$box2i()] xmin, ymin, xmax, ymax of display. Default: image size c(0, 0, w-1, h-1)

lineOrder

[exr_type$lineOrder()] Line ordering. One of 'increasing', 'decreasing' or 'random'. Default: 'increasing'

pixelAspectRatio

[exr_type$float()]. Default: 1.0

screenWindowCenter

[exr_type$v2f()]. Default: c(0.0, 0.0)

screenWindowWidth

[exr_type$float()]. Default: 1.0

...

Other named parameters. value must be of class exr_type e.g. myLabel = exr_type$string("potpourri").

Details

In the majority of cases for basic image output, there is no need to specify anything with this function. write_exr() will create mandatory attributes required for image output.

Note that all values must be an object with class exr_type. To create these types, use exr_type$<TYPE>(...).

Value

named list of attributes for writing EXR

Examples

exr_attrs(compression = exr_type$compression("ZIP"), 
          name        = exr_type$string("Render 032"))

[Package picohdr version 0.1.1 Index]