开发者

GdiPlus::DrawImage stretches image after I have edited it with GIMP?

开发者 https://www.devze.com 2023-02-12 23:02 出处:网络
I use this code to draw a png into my device context: auto_ptr<Gdiplus::Graphics> g(Gdiplus::Graphics::FromHDC(pDC->GetSafeHdc()));

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

精彩评论

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