displaying bitmap image into a dialog box from a byte array of pixel
On the dsp side, i need to capture and send an image of size 640*480(RGB bitmap image) to the pc(front end vc++ GUI) through TCP/IP socket communication. On the vc++ side, i need to receive the pixel data of the image and to display it as a picture in the picture control of the dialog box. Initially we tried to write the received pixel values into a file which is stored as a .bmp file format.But when we try to view the image, it says that "it is not a valid bitmap file or its format is not currently supported". When we opened the file using irfan view by adding its corresponding header, we are able to view the image. Then only we realised that the bitmap header is missing and thats why we tried using BITMAPFILEHEADER and BITMAPINFOHEADER. Now can you get any idea about our problem and can you please give me any alternate immediate solution to view the image from the received raw pixel data.
Re: displaying bitmap image into a dialog box from a byte array of pixel
Thanks for your reply. Before when we used SetDIBitsToDevice, we got only the last part of the image that too an inverted image. In the 640*480 frame size image, only a small portion can be viewed. The remaining part is filled with gray image. So can you infer any specific data from the above statements and please be specific in your reply. Can you please send me any code that has involved in the usage of SetDIBits.