require(plyr) somewhere.imeval(boats,~ xs*.)
is equivalent to: (Xc(boats)/width(boats))*boats and creates a fading effect.
imchange(boats,~ c==1,~ xs*.)
is the same thing but applied only to the first colour channel (R)im <- boats
im[sample(nPix(im),1e4)] <- NA
inpaint(im,1) %>% imlist(im,.) %>%
setNames(c("before","after")) %>%
plot(layout="row")
colorise(boats,~ sqrt(xc^2+yc^2) < 140,"blue",alpha=.2) %>% plot
see ?colorise for more.imfill(10,10,val="red") or autocrop(im,col="black")imfill(10,10,val='red')imfill(10,10)[3,1] does what you'd expect (i.e., the same as imfill(10,10)[3,1,1,1])