Hi,
I am trying to reproduce some of the code in this thread
https://forum.pellesc.de/index.php?topic=7146.0. I am confused by this block of code:
GpBitmap *bitmap = NULL;
GdipCreateBitmapFromScan0(100, 100, 0, PixelFormat32bppARGB, NULL, &bitmap); // create a bitmap object with specified width/height/color
GpGraphics *graph;
GdipGetImageGraphicsContext(bitmap, &graph); // create a graphic object via bitmap object
Because if I copy that to my program, the last line of this block gives a compiler error:
error #2140: Type error in argument 1 to 'GdipGetImageGraphicsContext'; expected 'GpImage (aka (incomplete) struct tagGpImage) *' but found 'GpBitmap (aka (incomplete) struct tagGpBitmap) *'. Which is consistent with the contents of fGdiPlusFlat.h
Am I doing something wrong? Or is there another way to create a graphic object from a bitmap?
BTW My ultimate goal is to create, display and save a bitmap as a .png-file, like in this post
https://stackoverflow.com/questions/39551863/creating-gdi-bitmaps-in-memory-and-then-saving-as-png.
Any help is appreciated.