To easily convert an image to grayscale you can use the effect or e parameter with a value of grayscale.
effect
e
grayscale