Render bitmap from byte array

May 25 at 8:10 AM
I want to create Bitmap object from byte[]. I used following code to this, but it gives to me error "Value does not fall within the expected range".
private Bitmap getBitmap(byte[] frame) {
   return RenderTarget.CreateBitmap(new SizeU((uint)img_w, (uint)img_h), frame, 0, new BitmapProperties(new PixelFormat(DxgiFormat.B8G8R8A8_UNORM, AlphaMode.Ignore), 100, 100));
}
Thanks in advanced.

Note : img_w = 720, img_h = 576, length of frame array = 720 * 576 * 4