Added grayscale and image return

I added the grayscale return as well as the option to return a base64 PNG verses the actual canvas.