add support for cropped image data (pixel array from canvas's 2D context) in addition to data URI