added a setDataURL function which allow to draw a data URL image.
added a getJpegDataURL and a getPngDataURL functions.