This sample shows how to use Diagram.makeImageData with the returnType: "blob"
option and the necessary callback
option.
Blobs may not be supported or work consistently on all browsers. This code was tested with Chrome, Firefox 50, IE11 and IE Edge.