GdiPlus::DrawImage stretches image after I have edited it with GIMP?
I use this code to draw a png into my device context:
auto_ptr<Gdiplus::Graphics> g(Gdiplus::Graphics::FromHDC(pDC->GetSafeHdc()));
g->DrawIma开发者_运维知识库ge(pPng, xDest, yDest, xSrc, ySrc, nSrcWidth, pSrcHeight, Gdiplus::UnitPixel);
This pastes the png just how it's supposed to. I edit the png with GIMP. My function now draws the png stretched. I edit it with mspaint doing the exact same changes. The png is drawn fine.
How does this happen?
精彩评论