| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/cvd_image.R |
| 3 |
\name{cvd_image} |
| 4 |
\alias{cvd_image} |
| 5 |
\title{Convert Colors of an Image} |
| 6 |
\usage{ |
| 7 |
cvd_image(img, type, file, severity = 1, linear = TRUE) |
| 8 |
} |
| 9 |
\arguments{ |
| 10 |
\item{img}{\code{character} or \code{array} as returned by \code{readPNG} and \code{readJPEG} |
| 11 |
of size \code{height x width x depth}. The depth coordinate contains |
| 12 |
R/G/B and alpha if given (png). In case of a single character string \code{img} |
| 13 |
has to be the full path to an image of type png or jpg/jpeg.} |
| 14 |
|
| 15 |
\item{type}{\code{string} name of the function which will be used to |
| 16 |
convert the colors (\code{deutan}, \code{protan}, \code{tritan}, \code{desaturate}). |
| 17 |
If set to \code{original} the image will be written as is.} |
| 18 |
|
| 19 |
\item{file}{\code{string} with (full) path to resulting image. Has to |
| 20 |
be a png image name.} |
| 21 |
|
| 22 |
\item{severity}{numeric. Severity of the color vision defect, a number between 0 and 1.} |
| 23 |
|
| 24 |
\item{linear}{logical. Should the color vision deficiency transformation be applied to the |
| 25 |
linearized RGB coordinates (default)? If \code{FALSE}, the transformation is applied to the |
| 26 |
gamma-corrected sRGB coordinates (which was the default up to version 2.0-3 of the package).} |
| 27 |
} |
| 28 |
\description{ |
| 29 |
Used in \code{cvd_emulator}. Takes an image object and converts |
| 30 |
the colors using \code{\link{deutan}}, \code{\link{protan}}, |
| 31 |
\code{\link{tritan}}, \code{\link{desaturate}} functions. The image |
| 32 |
will be written to disc as a PNG file. |
| 33 |
} |