Added javascript to grayscale and draw image to canvas.