I am testing JPEG decompression on a bunch of computers with different versions of Windows. All of these computers have .NET 4 installed and I am compiling against .NET 2 and the "Any CPU" platform target. The following code produces different output on different systems.
Bitmap bmp = (Bitmap)Image.FromFile("test.jpg");
long datasum = 0;
for (int y = 0; y < bmp.Height; y++)
for (int x = 0; x < bmp.Width; x++)
datasum = datasum + bmp.GetPixel(x, y).R + bmp.GetPixel(x, y).G + bmp.GetPixel(x, y).B;
Console.WriteLine(datasum);
All the Win7 64-bit and WinXP 32-bit machines produce one result. And all the Win7 32-bit machines produce another result.
Any ideas why the output would be different?