Create an ImageBuffer in the specified format with the same dimensions and contents as a canvas.
|canvas||HTMLCanvasElement||the source HTMLCanvasElement object from which the ImageBuffer object will be constructed.|
|format||ImageBufferFormat||the desired format of the created ImageBuffer; defaults to Rgba.|
Returns - an ImageBuffer object containing the contents of the source canvas, or undefined if the conversion fails.
Last Updated: 20 September, 2019