Set scale and resolution

Refer to the following example code to see how to set the scaling ratio and dpi of the exported image.