Forum Discussion

Prathibha_krish's avatar
Prathibha_krish
Occasional Contributor
12 years ago

Not able to compare Large Image size images in TC9

Hi 

I have JPG image of size 5.76 MB .

when i tried to compare it it was giving an error"Picture object doesnt contain any image"



This is the script i used to compare and i have attached the images also. but same script is working for image whose image size 2.82 MB i am attaching that image also.

Image name which is comparing (NB_Astra Cells.jpg)

Image nem which is not comparing is(LIBB_Ring.jpg)



But this comparision is working fine in both TC 7 and 8 version


Sub Test1



Dim Pict1

dim Pict2

dim ResultImage

  Set Pict1 = Utils.Picture

  Set Pict2 = Utils.Picture



  Pict1.LoadFromFile("C:\LIBB_Ring.jpg")

  Pict2.LoadFromFile("C:\LIBB_Ring.jpg")



  Set ResultImage = Pict1.Difference(Pict2)

   If ResultImage Is Nothing Then

     Log.Message("The images are identical")

   Else

     Log.Picture(ResultImage)

   End If



End Sub


3 Replies

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Prathibha,


     


    I've tried your code with both images in TestComplete 9.20, and it worked. What TC version are you using?


    BTW, I've got the same message when I specified an incorrect path to the image by mistake. Check that as well.