n-by-m-by-3 array or n-by-m-by-4 array representing an rgb(+alpha) image
invert
logical flag indicating whether the channel-brightness should be inverted
colshift
numerical value between 0 and 1 setting the circular shift of the hue value. If invert=TRUE, choosing colshift=0.5 preserves the colors, while inverting black and white.
blur
numerical value >=0 defining the standard deviation of an optional Gaussian blur.
file.in
optional input filename, which can be used to load an image instead of providing it via img. This filename is ignored if img is specified.
file.out
optional output filename.
format
one of "png" or "jpg" specifying the file format of the input and output image.
show.image
logical flag specifying whether the image is displayed in the R console.
Value
Returns an n-by-m-by-3 array or n-by-m-by-4 array of the processed image.
# NOT RUN {img = yinyangyong # this is an example image included in the package# invert brightness of all channelsinvert(img)
# invert brightness, but preserve hueinvert(img, colshift=0.5)
# }