Converts an Outsystems div container into a binary image or a base64 image.
Supports png, jpg, gif and bmp output formats.
Based on http://html2canvas.hertzen.com/ script.