Creating a bitmap image of a char[] buffer

  bitmap, c++

I am trying to create a bitmap image of a buffer char[] in my code. Tried several options but none of them seem to really do the trick. There are lots of c# examples but unfortunately I am coding in C++.

The camera I use return a buffer array with chars.
I do have these variables:

buffer->grabResult.GetSizeX();
buffer->grabResult.GetSizeY();
buffer->grabResult.GetOffsetX();
buffer->grabResult.GetOffsetY();

I tried using the following tutorial https://solarianprogrammer.com/2018/11/19/cpp-reading-writing-bmp-images.

Since this tutorial is about creating your own images, which I already have is the point where I got stuck.

Source: Windows Questions C++

LEAVE A COMMENT