Apply exposure compensation and ISO gain

render_exposure(
  image,
  exposure = 0,
  iso = NA,
  auto = FALSE,
  percentile = 0.99,
  verbose = FALSE,
  filename = NA,
  preview = FALSE,
  ...
)

Arguments

image

3-layer RGB/4-layer RGBA array, rayimg class, or filename of an image.

exposure

Default 0. Exposure compensation in stops; applied directly to RGB values.

iso

Default NA. ISO gain to apply directly to RGB values. NA applies no ISO gain and preserves the current informational ISO metadata.

auto

Default FALSE. If TRUE, automatically add the exposure needed to place a luminance percentile at 1.0 for LDR display/output. exposure is then treated as an additional compensation value.

percentile

Default 0.99. Luminance percentile used when auto = TRUE. Must be greater than 0 and less than or equal to 1. Use 1 for max luminance.

verbose

Default FALSE. If TRUE and auto = TRUE, print the automatically computed exposure adjustment.

filename

Default NA. Output path.

preview

Default FALSE. If TRUE, display the image.

...

Additional args passed to plot_image() (when preview=TRUE) or to ray_write_image() (when filename is given).

Value

A rayimg RGBA array.

Examples

# LDR/sRGB (auto): decodes to linear, applies EV, records camera metadata
  render_exposure(dragon, exposure = +1, preview = TRUE)

# Force linear/HDR behavior
  render_exposure(dragon * 2, exposure = -1, preview = TRUE)