how to convert BGR byte array to image
<p>I know how to convert byte array to image. Here is my code:</p>

<pre><code>//Here create the Bitmap to the know height, width and format
Bitmap bmp = new Bitmap(width, height, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
//Bitmap bmp = new Bitmap(width, height);

//Create a BitmapData and Lock all pixels to be written 
System.Drawing.Imaging.BitmapData bmpData = bmp.LockBits(
                     new Rectangle(0, 0, bmp.Width, bmp.Height),
                     ImageLockMode.WriteOnly, bmp.PixelFormat);

//Copy the data from the byte array into BitmapData.Scan0
Marshal.Copy(imgDataArray, 0, bmpData.Scan0, imgDataArray.Length);
//Unlock the pixels
bmp.UnlockBits(bmpData);
bmp.Save("output1.png", System.Drawing.Imaging.ImageFormat.Png); 
</code></pre>

<p>But when byte array is BGR format, the image color is wrong (red is blue; blue is red). Anyone can help me to figure out that? Thanks. </p>
