Calculate screen DPI

前端 未结 3 1625
广开言路
广开言路 2021-01-02 23:48

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

3条回答
  •  日久生厌
    2021-01-03 00:11

    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.

提交回复
热议问题