paste.RGBImage {R.image}R Documentation

Pastes another RGBImage or image layers to this image

Description

Pastes another RGBImage or image layers to this image.

Usage

## S3 method for class 'RGBImage':
paste(this, x, y, R=NULL, G=NULL, B=NULL, ...)

Arguments

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.

Value

Returns nothing.

Author(s)

Henrik Bengtsson (http://www.braju.com/R/)

See Also

For more information see RGBImage.

Examples

   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)
  

[Package R.image version 0.2.3 Index]