It really depends on what is in the byte array. An HBITMAP is just a handle to a bitmap.
The bitmap can be one of 6 different formats.
The structure of the bitmap can be found in
http://www.fileformat.info/format/bmp/corion.htmOne of the things you have to be aware of is that the bitmaps are stored upside down. The top line is at the bottom of the file and the bottom line is at the top.