pBitmap refers to bitmap (picture of window). I want to do rotation with the pBitmap2 but I cannot find out
Code: Select all
GpGraphics * pG; // I create graphics from bitmap result = Gdiplus::DllExports::GdipGetImageGraphicsContext(pBitmap, &pG); // here to work with graphics // here to check the image ... save to file CLSID pngClsid; GetEncoderClsid(L"image/png", &pngClsid); GpBitmap* pBitmap2; result = Gdiplus::DllExports::GdipCreateBitmapFromGraphics(60, 60, pG, &pBitmap2);
1) how to insert the bitmap (picture) into the bitmap2 (empty one - just created)
2) how to get the graphics back to bitmap.
3) Edit: I think 1) is not what I really need. I need to convert graphics to bitmap. BUt when I call
GdipCreateBitmapFromGraphics I got blank file! So pls how to convert the graphics to bitmap?
result = Gdiplus::DllExports::GdipCreateBitmapFromGraphics(60, 60, pG, &pBitmap2);
If you know how to do it in AHK, pls help and I will find out how to do it in C++. If you know how to do it in C++ help me with C++ version directly.