Apply exposure compensation (in stops)

render_exposure(image, exposure = 0, 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; RGB is scaled by 2^exposure.

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, re-encodes
if (run_documentation()) {
  render_exposure(dragon, exposure = +1, preview = TRUE)
}

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