Type: | Package |
Title: | Static Library and Headers for 'OpenEXR' Image I/O |
Version: | 3.4.0-4 |
Description: | Provides the 'OpenEXR' static library and 'C++' headers for high-dynamic-range image I/O (see https://openexr.com/) needed to link R packages against the 'OpenEXR' library, along with a basic R interface to load 'EXR' images. |
Depends: | R (≥ 4.3.0) |
License: | BSD_3_clause + file LICENSE |
LinkingTo: | libimath, libdeflate |
Encoding: | UTF-8 |
LazyData: | true |
SystemRequirements: | CMake, GNU make |
RoxygenNote: | 7.3.2 |
Biarch: | TRUE |
BugReports: | https://github.com/tylermorganwall/libopenexr/issues |
NeedsCompilation: | yes |
Packaged: | 2025-07-22 02:23:18 UTC; tyler |
Author: | Tyler Morgan-Wall |
Maintainer: | Tyler Morgan-Wall <tylermw@gmail.com> |
Repository: | CRAN |
Date/Publication: | 2025-07-23 08:10:02 UTC |
Read an OpenEXR image
Description
Load an RGBA OpenEXR image into R numeric matrices.
Usage
read_exr(path, array = FALSE)
Arguments
path |
Character scalar. Path to an '.exr' file. |
array |
Default 'FALSE'. Return a 4-layer RGBA array instead of a list. |
Value
A list with elements 'r', 'g', 'b', 'a' (numeric matrices), and the integer dimensions 'width', 'height'.
Examples
#Write the included data to an EXR file
tmpfile = tempfile(fileext = ".exr")
write_exr(tmpfile,
widecolorgamut[,,1],
widecolorgamut[,,2],
widecolorgamut[,,3],
widecolorgamut[,,4])
exr_file = read_exr(tmpfile)
str(exr_file)
Wide Color Gamut EXR Data
Description
Wide Color Gamut numeric data in RGBA list format from the OpenEXR project.
Usage
widecolorgamut
Format
An array of four channels (RBGA) and a width/height
Source
<https://openexr.com/en/latest/test_images/TestImages/WideColorGamut.html>
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])