% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/render_exposure.R
\name{render_exposure}
\alias{render_exposure}
\title{Apply exposure compensation and ISO gain}
\usage{
render_exposure(
  image,
  exposure = 0,
  iso = NA,
  auto = FALSE,
  percentile = 0.99,
  verbose = FALSE,
  filename = NA,
  preview = FALSE,
  ...
)
}
\arguments{
\item{image}{3-layer RGB/4-layer RGBA array, \code{rayimg} class, or filename of an image.}

\item{exposure}{Default \code{0}. Exposure compensation in stops; applied directly to RGB values.}

\item{iso}{Default \code{NA}. ISO gain to apply directly to RGB values. \code{NA} applies no ISO gain
and preserves the current informational ISO metadata.}

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

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

\item{verbose}{Default \code{FALSE}. If \code{TRUE} and \code{auto = TRUE}, print the
automatically computed exposure adjustment.}

\item{filename}{Default \code{NA}. Output path.}

\item{preview}{Default \code{FALSE}. If \code{TRUE}, display the image.}

\item{...}{Additional args passed to \code{\link[=plot_image]{plot_image()}} (when \code{preview=TRUE})
or to \code{\link[=ray_write_image]{ray_write_image()}} (when \code{filename} is given).}
}
\value{
A \code{rayimg} RGBA array.
}
\description{
Apply exposure compensation and ISO gain
}
\examples{
\dontshow{if (interactive() || identical(Sys.getenv("IN_PKGDOWN"), "true")) withAutoprint(\{ # examplesIf}
# 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)
\dontshow{\}) # examplesIf}
}
