【发布时间】:2011-05-29 08:29:26
【问题描述】:
我有一个图像网格,我点击一个,我在那个网格“二维图像数组”上搜索这个图像 然后我想检查这张图片是否是我需要的, 网格中的图像是:
BitmapImage img = new BitmapImage(new Uri("/Mines1.2;component/Images/new.png", UriKind.Relative));
Image temp = new Image();
temp.Height = 50;
temp.Width = 40;
temp.Source = img;
temp.Name = i.ToString() + j.ToString();
temp.MouseLeftButtonDown += new MouseButtonEventHandler(this.explore);
explore是我点击图片时想要去的功能。
我现在想将图像 temp 与另一个比较,我用它的资源 uri 来做这个
if(temp.source.equals(new BitmapImage(new Uri("/Mines1.2;component/Images/new.png", UriKind.Relative))))
但这不起作用! 我想检查两个图像是否相同或不使用 uri 或源或任何东西,但我当然不会检查每个像素。
【问题讨论】:
标签: c# .net windows-phone-7 mobile windows-mobile