created getPixels() action which returns a json representation of a canvas