Image Processing v2.1

BTW to convert from the byte[] back to an image is simple enough

private Bitmap ConvertBitmap(byte[] frame, int width, int height)
{
    Bitmap bmp = new Bitmap(
 width,
 height,
 PixelFormat.Format24bppRgb);

    BitmapData data = bmp.LockBits(
 new Rectangle(0, 0, bmp.Width, bmp.Height),
 ImageLockMode.WriteOnly,
 PixelFormat.Format24bppRgb);

    System.Runtime.InteropServices.Marshal.Copy(frame, 0, data.Scan0, frame.Length);

    bmp.UnlockBits(data);
    return bmp;
}

Published Monday, September 17, 2007 3:35 PM by sweisfeld
Filed under: , , ,

Comments

# re: Image Processing v2.1

oh *** .. nice!

Monday, September 17, 2007 2:42 PM by ellerbus

# re: Image Processing v2.1

that was supposed to be "oh sh!t ... nice"

Monday, September 17, 2007 2:46 PM by ellerbus