These replacement functions let you modify part of an image (for example, only the red channel). Note that cimg objects can also be treated as regular arrays and modified using the usual  operator.
1 2 3 4 5 6 7 8 9
an image to be modified
the image to insert
channel<-: Replace image channel
R<-: Replace red channel
G<-: Replace green channel
B<-: Replace blue channel
frame<-: Replace image frame
1 2 3 4 5 6 7 8 9 10 11
boats.cp <- boats #Set the green channel in the boats image to 0 G(boats.cp) <- 0 #Same thing, more verbose channel(boats.cp,2) <- 0 #Replace the red channel with noise R(boats.cp) <- imnoise(width(boats),height(boats)) #A new image with 5 frames tmp <- imfill(10,10,5) #Fill the third frame with noise frame(tmp,3) <- imnoise(10,10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.