Shortcut, returns the dimensions of an image if it had only one colour channel
gsdim(im)
im
an image
returns c(dim(im)[1:3],1)
Simon Barthelme
imnoise(dim=gsdim(boats))