private void SwapLines(int i, int j) { BitmapLine temp = Lines[j]; Lines[j] = Lines[i]; Lines[i] = temp; }
public ScrambledBitmap(Bitmap image) { Lines = new BitmapLine[image.Height]; for (int row = 0; row < image.Height; row++) { Lines[row] = new BitmapLine(row, new Color[image.Width]); for (int col = 0; col < image.Width; col++) { Lines[row].Pixels[col] = image.GetPixel(col, row); } } IsSorted = true; }