1.public static bool ImageCompareString(Bitmap firstImage, Bitmap secondImage)
2: {
3: MemoryStream ms = new MemoryStream();
4: firstImage.Save(ms, System.Drawing.Imaging.ImageFormat.Png);
5: String firstBitmap = Convert.ToBase64String(ms.ToArray());
6: ms.Position = 0;
7:
8: secondImage.Save(ms, System.Drawing.Imaging.ImageFormat.Png);
9: String secondBitmap = Convert.ToBase64String(ms.ToArray());
10:
11: if (firstBitmap.Equals(secondBitmap))
12: {
13: return true;
14: }
15: else
16: {
17: return false;
18: }
19: }