User blog comment:Logo12/Tools/@comment-5294711-20140928102503/@comment-5294711-20140928122321

Oh, also, I just found out something (how could I be so stupid?! >.<) You can replace the algorithms for scrx and scry with:

scrx = resx/ppi

scry = resy/ppi

Though this will give less exact results if the PPI is rounded like it should be, it'd make the algorithms way simpler.