Compare ImageView Backgrounds?

PharCyDeD

Active Member
Licensed User
Longtime User
How would you go about comparing two ImageView backgrounds? For instance, I tried:

Code: Copy
If ImageView1.Bitmap = ImageView2.Bitmap Then
Label1.Text = "Yes"
End If

and

Code: Copy
If ImageView1.Background = ImageView2.Background Then
Label1.Text = "Yes"
End If

I am not getting any results with this...any help? :BangHead:


I am using:

Code: Copy
ImageView1.SetBackgroundImage(LoadBitmap(File.DirAssets, "Krazy_Triangles_[48]_021.png"))

To set the backgrounds if that helps.
 
Last edited:
The bitmaps will be two separate objects, even if the contents are the same (the same image). Comparing ImageView1.Bitmap = ImageView2.Bitmap is actually comparing the pointers to the objects so will always be different.

The Background and bitmap are different objects as well (I think).

The easiest way would probably be to record the filename loaded in the ImageViews Tag Property at the time of loading then compare that.
 
Last edited:
Upvote 0
Back
Top