Export SVG to raster image via canvas

SVG XML

The inline SVG XML.

SVG Image

SVG XML is then turned into the src of an svg image element.

Canvas

The svg image can then be painted onto a canvas element.

JPG and PNG

The canvas can then output the image data as a jpg and png.