Forum Discussion

dhagal's avatar
dhagal
New Contributor
6 years ago

Unable to get masking to work when comparing Images

Dear Team,

 

I am currently working on a test where an image appears on the screen with some text on it (ExpectedImage). The background of this image can vary depending on different states of the system. I am only interested in the text present irrespective of the background color. Hence I created a monochrome mask image (MaskImage). When the image appears on the screen during the course of the test (ActualImage), I expected it to pass due to the use of mask picture. But the test fails with the difference in images shown as in DifferenceImage. 

 

Can any one please help me understand why this is failing ? Is my understanding of usage of masking incorrect ?

 

Thanks

Dhagal

 

(Attached project with the images as described in the issue)

 

 

  • dhagal's avatar
    dhagal
    6 years ago

    Hi Robert,

     

    Thanks for the response. I did try by setting the transparency parameter to false, but it still did not work. I had raised the same with the support team and have received a response as to the masked image having contour pixels in it (its visible when zoomed to 800%). I have decided to make use of Transparent images (so no background) and that is working. 

     

    Thanks

    Dhagal

    • dhagal's avatar
      dhagal
      New Contributor

      Hi Robert,

       

      Thanks for the response. I did try by setting the transparency parameter to false, but it still did not work. I had raised the same with the support team and have received a response as to the masked image having contour pixels in it (its visible when zoomed to 800%). I have decided to make use of Transparent images (so no background) and that is working. 

       

      Thanks

      Dhagal

      • TanyaYatskovska's avatar
        TanyaYatskovska
        SmartBear Alumni (Retired)

        Hi dhagal,

        I'm happy to hear that the question is resolved. I've marked your reply as a solution so that other members could find the answer faster!