static void draw(cameraForm f) { Bitmap temp; temp = b; short[] data = new short[depth.PixelDataLength]; depth.CopyPixelDataTo(data); for (int y = 0; y < depth.Height; y++) { for (int x = 0; x < depth.Width; x++) { short s = data[(depth.Width * y + x)]; Color col = temp.GetPixel(2 * x, 2 * y); if ((s & 0x0007) != 0) { col = Color.FromArgb(col.R, col.G, (col.B + 255) / 2); temp.SetPixel(2 * x, 2 * y, col); } } } f.draw(temp); }
static void draw(cameraForm f) { Bitmap temp; temp = b; short[] data = new short[depth.PixelDataLength]; depth.CopyPixelDataTo(data); for (int y = 0; y < depth.Height; y++) { for (int x = 0; x < depth.Width; x++) { short s = data[(depth.Width*y+x)]; Color col = temp.GetPixel(2*x,2*y); if((s&0x0007)!=0) { col = Color.FromArgb(col.R,col.G,(col.B+255)/2); temp.SetPixel(2 * x, 2 * y, col); } } } f.draw(temp); }