pythongosssss / ComfyUI-Custom-Scripts

Enhancements & experiments for ComfyUI, mostly focusing on UI features
MIT License
1.86k stars 144 forks source link

fix: the offset should not be multiplied by the scale #386

Closed Kathleen-Xu closed 2 weeks ago

Kathleen-Xu commented 2 weeks ago

This pull request is to fix the offset problem caused by #375.

375 fixed the problem of exporting images on high DPI devices by multiplying the image width, height and transform by the devicePixelRatio. But it also multiplied the offset by the devicePixelRatio, which caused some workflows with large offsets to not be correctly displayed in the center of the exported image.