Advertisement
tic

Gdip_CompareImage

tic
Mar 25th, 2013
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. int Gdip_CompareImage(unsigned int * Bitmap1, unsigned int * Bitmap2, int w, int h, int Stride, int * x, int * y)
  2. {
  3.     int offset = Stride/4;
  4.     for (int y1 = 0; y1 < h; ++y1)
  5.     {
  6.         for (int x1 = 0; x1 < w; ++x1)
  7.         {
  8.             if (Bitmap1[x1+(y1*offset)] != Bitmap2[x1+(y1*offset)])
  9.             {
  10.                 x[0] = x1; y[0] = y1;
  11.                 return 0;
  12.             }
  13.         }
  14.     }
  15.     x[0] = -1; y[0] = -1;
  16.     return -1;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement