Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

About this user

Miroslav Stampar http://mstampar.awardspace.com

« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS 

Compare two bitmap objects

        private bool PicsIdentical(Bitmap bmp1, Bitmap bmp2)
        {
            bool retVal = true;

            if (bmp1.Size != bmp2.Size)
                retVal = false;
            else
            {
                for (int x = 0; x < bmp1.Width; x++)
                {
                    for (int y = 0; y < bmp1.Height; y++)
                    {
                        if (bmp1.GetPixel(x, y) != bmp2.GetPixel(x, y))
                        {
                            retVal = false;
                            break;
                        }
                    }
                }
            }
            return retVal;
        }
« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS