Forum Discussion

poffin's avatar
poffin
Occasional Contributor
8 years ago

Workarounds for differences in DPI/PPI?

My region/image comparison tests fail on other test machines because of a different monitor setup, resulting in a different DPI. The images are identical in shape, but the sizes are unequal. Are there any tips and tricks for getting around this? The documentation found here was helpful in discovering the issue, but unfortunately I found no solutions.

2 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    From the link you found:

    "DPI Setting

    The dots per inch (DPI) setting determines the size of objects and text displayed on your screen. Thus, the compared images must be captured at the same DPI value. The default value of the Windows DPI setting is 96 dots per inch."

     

    ...Must be captured at the same DPI value... sounds like you are stuck.

     

    Can you adjust the DPI to be the same on both machines as a step before the comparison?  Or is there some way to test a specific object instead of using the region/image?

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      I always question using any kind of image or region compare. While there are some cases when it is clearly necessary, usually there are other ways of checking visual compliance of the UX without having to resort to an image comparison. 

      Color, size, etc., can all be checked with object properties. If you are checking a web page, you can even do an object comparison of the document elements to check for different aspects of the page. You can compare positions of objects by checking their relative distance from the upper right corner of the screen. All sorts of ways to check without having to resort to an image comparison.