 <p>You never actually said what format <code>pPixMapBits</code> is in, but I'm guessing that it contains 16-bit values where 0 represents black, 32768 represents gray, and 65535 represents white.</p> <p>You are creating a <code>BITMAPINFOHEADER</code> with <code>bitBitCount = 16</code> and <code>biCompression = BI_RGB</code>. According to <a href="https://msdn.microsoft.com/en-us/library/dd183376(v=vs.85).aspx" rel="nofollow">the documentation</a>, if you set the fields that way, then:</p> <blockquote> <p>Each <strong>WORD</strong> in the bitmap array represents a single pixel. The relative intensities of red, green, and blue are represented with five bits for each color component. The value for blue is in the least significant five bits, followed by five bits each for green and red. The most significant bit is not used.</p> </blockquote> <p>This is not the same format as your source data, and you are doing no conversion, so you get junk. Note that the bitmap format you chose is capable of representing only 2^5 = 32 shades of gray, not 65536, so you will suffer loss of quality during the conversion.</p>