Pixel to MM equation?

后端 未结 9 867
心在旅途
心在旅途 2020-12-01 16:44

Is there a reliable equation to work out pixel size to MM? Or is that not possible cross device?

We are working with a bespoke system that delivers content to many

相关标签:
9条回答
  • 2020-12-01 17:17

    tl;dr: If you don't know the DPI of the device, you won't be able to deduce how big the pixel is in the real-world.


    Pixels on their own are not real-world units of measurement.

    They can become a real-world measurement if you take into account the DPI value of the device that displays them.

    The formula is:

    • mm = ( pixels * 25.4 ) / DPI

    So 8 pixels viewed on a 96-DPI screen setting:

    • ( 8 * 25.4 ) / 96 = 2.116mm

    All this assuming the device is not scaled/zoomed.

    0 讨论(0)
  • 2020-12-01 17:17

    You cannot reliably calculate this since there is no way to detect physical screen size.

    0 讨论(0)
  • 2020-12-01 17:18

    You would need to know the DPI of the device and if the display is scaled or not. That would mean that you would have to have a database of the physical screen dimensions and screen resolutions of each device.

    0 讨论(0)
提交回复
热议问题