| paste.RGBImage {R.image} | R Documentation |
Pastes another RGBImage or image layers to this image.
## S3 method for class 'RGBImage': paste(this, x, y, R=NULL, G=NULL, B=NULL, ...)
x, y |
The top left corner position in the (R,G,B) matrices where
the pasting should start. Note that x and y must be
greater or equal to one. |
R, G, B |
Image layers as matrices for the the red, the green, and
the blue channel, respectively. If R is a RGBImage object, the
that object is pasted. |
... |
Not used. |
Returns nothing.
Henrik Bengtsson (http://www.braju.com/R/)
For more information see RGBImage.
logo <- BitmapImage$read("logosm.ppm", path=system.file("images", package="R.image"))
hb <- BitmapImage$read("hb.ppm", path=system.file("images", package="R.image"))
# Puts a red dot at position (10,10) in the logo
logo$paste(10,10, R=255, G=0, B=0)
# Paste the logo into the hb image at the top left corner.
hb$paste(1,1, logo)
image(hb)