Fast Bitmap modifying using BitmapData and pointers in C#
问题 I am capturing data from some camera (array of RAW data). Then I'm mapping this data to RGB values according to color palette. I need to map it as fast as possible, so I use BitmapDdata and edit pixels in unsafe piece of code using pointers. public void dataAcquired(int[] data) { Bitmap bmp = new Bitmap(width, height); BitmapData data = bmp.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb); for (int i = 0; i < data.Length; i++) { int x = i % bmp