toDataURL and toImage now work correctly on devices with a pixel ratio != 1