private Image FrameDraw(Image img) { int max = img.Height; int min = img.Height / 8; Graphics gp = Graphics.FromImage(img); Bitmap bmp = new Bitmap(img); System.Drawing.Imaging.PixelFormat Format = img.PixelFormat; for (int i = max; i >= min; i = i / 2) { for (int x = 0; x < img.Width; x += i) { for (int y = 0; y < max; y += i) { Rectangle rect = new Rectangle(0, 0, i, i); Bitmap clone = bmp.Clone(rect, Format); Bitmap32 bmp32 = new Bitmap32(clone); bmp32.LockBitmap(); bmp32.Robert(r, g, b); bmp32.UnlockBitmap(); } } } return(img); }