开发者

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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜