I am using Python to build an image-rendering app that renders numpy arrays as images. I need a way to automate the calculation screen DPI, as I am generating images of the
If you don't want to use Qt, you can use your last approach because in my case, there is a 45.95 dpi difference between a Qt solution and ctypes solution. I think it's always the same for all laptops. Just add (45.96 dpi) on your result every time you use ctypes.