% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/conversions.R
\name{as.cimg.raster}
\alias{as.cimg.raster}
\title{Convert a raster object to a cimg object}
\usage{
\method{as.cimg}{raster}(obj, ...)
}
\arguments{
\item{obj}{a raster object}

\item{...}{ignored}
}
\value{
a cimg object
}
\description{
R's native object for representing images is a "raster". This function converts raster objects to cimg objects.
}
\examples{
rst <- as.raster(matrix((1:4)/4,2,2))
as.cimg(rst) \%>\% plot(int=FALSE)
all.equal(rst,as.raster(as.cimg(rst)))

}
\author{
Simon Barthelme
}
