Convert array of integers to bitmap and display in PictureBox (windows Forms C++/CLR)

  c++, clr, forms, windows

I am developing a windows Forms application, with C++/CLR.

I have an array of integers, let’s say int img_array[64][64];. This 2D array contains values of a 64×64 pixels image. I need to display this array in a Picture box and I am trying to find a way to convert it into a Bitmap^ bmp; type, so that I can finally execute pictureBox1->Image = bmp;.

Thank you in advance for any advice.

Source: Windows Questions

LEAVE A COMMENT