write_exr: Write a numeric array as an EXR image

View source: R/exr-write.R

write_exrR Documentation

Write a numeric array as an EXR image

Description

Write a numeric array as an EXR image

Usage

write_exr(
  arr,
  filename,
  pixel_type = c("half", "float", "uint"),
  channel_names = NULL,
  attrs = exr_attrs(),
  verbosity = 0
)

Arguments

arr

array representing image

filename

filename

pixel_type

one of 'half', 'float' or 'double'. Default: 'half'

channel_names

character vector. names of each plane in the array. If NULL then channel names are extracted from the array with dimnames(arr)[[3]]. If no names are set on the array, then channel names defaults to "Y", "RGB" and "RGBA" for 1, 3, and 4 plane arrays respectively. For all other array sizes, channel names allocated alphabetically from 'A' to 'Z'

attrs

EXR attributes for image. Use exr_attrs()

verbosity

verbosity. default: 0

Value

None

Examples

orig_file <- system.file("image", "rstats.pfm.bz2", package = "picohdr")
arr <- read_pfm(orig_file)
exr_file <- tempfile(fileext = ".exr")
write_exr(arr, exr_file)

picohdr documentation built on Oct. 28, 2024, 5:08 p.m.