Use toDataUrl() to save canvas as image.