write_exr: Write an OpenEXR image

View source: R/read_write_exr.R

write_exrR Documentation

Write an OpenEXR image

Description

Save RGBA numeric matrices to an OpenEXR file (32‑bit float, ZIP compression).

Usage

write_exr(path, r, g, b, a = matrix(1, nrow = nrow(r), ncol = ncol(r)))

Arguments

path

Character scalar output file.

r

Numeric matrix, red channel.

g

Numeric matrix, green channel.

b

Numeric matrix, blue channel.

a

Numeric matrix, alpha channel.

Value

None.

Examples

#Write the included data to an EXR file
tmpfile = tempfile(fileext = ".exr")
write_exr(tmpfile,
          widecolorgamut[,,1],
          widecolorgamut[,,2],
          widecolorgamut[,,3],
          widecolorgamut[,,4])

libopenexr documentation built on Aug. 8, 2025, 6:44 p.m.