% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/render_clamp.R
\name{render_clamp}
\alias{render_clamp}
\title{Clamp Image}
\usage{
render_clamp(
  image,
  min_value = 0,
  max_value = 1,
  filename = NA,
  preview = FALSE,
  ...
)
}
\arguments{
\item{image}{3-layer RGB/4-layer RGBA array, \code{rayimg} class, or filename of an image.}

\item{min_value}{Default \code{0}. Minimum value to clamp the RGB channels in the image to.}

\item{max_value}{Default \code{1}. Maximum value to clamp the RGB channels in the image to.}

\item{filename}{Default \code{NA}. Filename}

\item{preview}{Default \code{FALSE}. If \code{TRUE}, it will display the image in addition
to returning it.}

\item{...}{Arguments to pass to either \code{jpeg::readJPEG}, \code{png::readPNG}, or \code{tiff::readTIFF}.}
}
\value{
A \code{rayimg} RGBA array.
}
\description{
Clamps an image to a user-specified range, ignoring the alpha channel.
}
\examples{
\dontshow{if (interactive() || identical(Sys.getenv("IN_PKGDOWN"), "true")) withAutoprint(\{ # examplesIf}
#The image of the unchanged image
range(dragon)
#Clamp the maximum and minimum values to one and zero
render_clamp(dragon) |>
 range()
\dontshow{\}) # examplesIf}
}
