How to convert a byte[] to Bitmap image?
-
Hai! I have an byte array. Now i need to display this data as an bitmap image in my dialog (in embedded Visual C++)? Is it possible, if possible How can i do it ? Thanks!
You probably have to convert your (probably) raw data to a bitmap. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
You probably have to convert your (probably) raw data to a bitmap. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
It's a two-step process:
- First, You must know what is the data format of your raw image.
- Then, you have to actually create the Windows Bitmap.
If you have a look at the source code of my "Plain C resampling DLL" [^] then you may have a clue on how the second step is performed. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]