int width = image.PixelWidth;
int height = image.PixelHeight;
string[] compressed = new string[height * width];
string oldr = "0"; string oldg = "0"; string oldb = "0";
int godown = 0;
var path = op.FileName;
int stride = width * 4;
byte[] pixelData = new byte[height * stride];
image.CopyPixels( pixelData, stride, 0);
for (int y = 0; y < height; y++)
{
for (int x = 0; x < width; x++)
{
int index = y * stride + 4 * x;
byte blue = pixelData[index];
byte green = pixelData[index + 1];
byte red = pixelData[index + 2];
int arraySlot = x + (y * width); int StandardArraySlot = arraySlot - godown;
string r = red.ToString(); string g = green.ToString(); string b = blue.ToString();
MessageBox.Show(r + " " + g + " " + b);