I'd like to use .Net Graphic functionality from C++ managed project. I'd like to create Windows.Drawing.Image (based on MemoryStream) from inmemory c++ array of bytes.
How can I make this piece of code work:
System::IO::Stream^ ms = gcnew System::IO::MemoryStream();
BYTE buf[1024 * 8]; // C++
int size; // C++
...
ms->Write(&buf, 0, size)
Thank you in advance!