I am trying to use Format16bppGrayScale, but I keep getting an error: "a generic error occurred in gdi+". I have a monochromatic camera that is giving me a 16-bit value and I want to store it in Format16bppGrayScale so I can keep my image from the camera. the 16-bit value is coming in an array that is two array indexes per one 16 bit value
public  Bitmap ByteToImage1(byte[] blob)
    {
        Bitmap bmpRGB = new Bitmap(KeepWidth, KeepHeight, System.Drawing.Imaging.PixelFormat.Format16bppGrayScale);
        Rectangle rect = new Rectangle(0, 0, KeepWidth, KeepHeight);
        BitmapData bmpData = bmpRGB.LockBits(rect, ImageLockMode.WriteOnly, bmpRGB.PixelFormat);
        int padding = bmpData.Stride - 3 * KeepWidth;
        unsafe
        {
            int i = 0;
            byte* ptr = (byte*)bmpData.Scan0;
            for( int y= 0; y < KeepHeight; y++)
            {
                    for(int x = 0; x < KeepWidth; x++)
                {
                    ptr[1] = blob[i+1];
                    ptr[0] = blob[i];
                    i = i + 2;
                    ptr += 2;
                }
                ptr += padding;
            }
        }
        bmpRGB.UnlockBits(bmpData);
        return bmpRGB;
    }
Update: Karsten's code
 private Bitmap GenerateDummy16bitImage(byte[] temp)
    {
        int i2 = 0;
        Bitmap b16bpp = new Bitmap(KeepWidth, KeepHeight, System.Drawing.Imaging.PixelFormat.Format16bppGrayScale);
        var rect = new Rectangle(0, 0, KeepWidth, KeepHeight);
        var bitmapData = b16bpp.LockBits(rect, ImageLockMode.WriteOnly, b16bpp.PixelFormat);
        // Calculate the number of bytes required and allocate them.
        var numberOfBytes = bitmapData.Stride * KeepHeight;
        var bitmapBytes = new short[KeepWidth * KeepHeight];
        // Fill the bitmap bytes with random data.
        var random = new Random();
        for (int x = 0; x < KeepWidth; x++)
        {
            for (int y = 0; y < KeepHeight; y++)
            {
                var i = ((y * KeepWidth) + x); // 16bpp
                // Generate the next random pixel color value.
                var value = (short)temp[i2]; //(short)random.Next(5);
                bitmapBytes[i] = value;         // GRAY
                i2++;
            }
        }
        // Copy the randomized bits to the bitmap pointer.
        var ptr = bitmapData.Scan0;
        Marshal.Copy(bitmapBytes, 0, ptr, bitmapBytes.Length);
        // Unlock the bitmap, we're all done.
        b16bpp.UnlockBits(bitmapData);
        return b16bpp;
    }