Forum Discussion

mengbinhao's avatar
mengbinhao
Frequent Contributor
4 years ago
Solved

Compare function's result of PIcture is not unique

Hi there,

    When I test below function, Pict1 and Pict2 are totally different, but sometimes it gets 'Same', sometimes it gets 'not same', Please guide me why the compare result is not unique. 

 

 

function Test1()
{
  Pict1 = Utils.Picture;
  Pict1.LoadFromFile("X:\\XXX\\img.png");

  if (Pict1.Compare(Pict2))
  {
    Log.Message("Same");
  } else {
    Log.Message("Not Same");
  }

 

 

  • Fix this issue by adjusting pixel tolerance and color tolerance to get the same result

3 Replies

    • mengbinhao's avatar
      mengbinhao
      Frequent Contributor

      Hi, 

      Still got different results, I used exact same picture to test picture.difference function(Please see screenshot), The difference in results is very large. Anything I can do for getting an accurate answer?

      lADPJw1WRRF3CO7NC9DND8A_4032_3024.jpg_720x720q90g.jpglADPJwY7R8fqCEfNC9DND8A_4032_3024.jpg_720x720q90g.jpglADPJxuMP6SYg4fNC9DND8A_4032_3024.jpg_720x720q90g.jpg

       

  • mengbinhao's avatar
    mengbinhao
    Frequent Contributor

    Fix this issue by adjusting pixel tolerance and color tolerance to get the same result