% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cimg_class.R
\name{pad}
\alias{pad}
\title{Pad image with n pixels along specified axis}
\usage{
pad(im, nPix, axes, pos = 0, val)
}
\arguments{
\item{im}{the input image}

\item{nPix}{how many pixels to pad with}

\item{axes}{which axes to pad along}

\item{pos}{-1: prepend 0: center 1: append}

\item{val}{colour of the padded pixels (default 0 in all channels). Can be a string for colour images, e.g. "red", or "black".}
}
\value{
a padded image
}
\description{
Pad image with n pixels along specified axis
}
\examples{
pad(boats,20,"xy") \%>\% plot
pad(boats,20,pos=-1,"xy") \%>\% plot
pad(boats,20,pos=1,"xy") \%>\% plot
pad(boats,20,pos=1,"xy",val="red") \%>\% plot
}
\author{
Simon Barthelme
}
