微调加载图像质量
This commit is contained in:
parent
3a9059c048
commit
570cc3f686
|
@ -530,6 +530,7 @@ static HGResult LoadGdiImage(Gdiplus::Image* pImage, const HGImageRoi* roi, HGUI
|
||||||
HDC hMem = CreateCompatibleDC(NULL);
|
HDC hMem = CreateCompatibleDC(NULL);
|
||||||
HBITMAP hOldBmp = (HBITMAP)SelectObject(hMem, hBmp);
|
HBITMAP hOldBmp = (HBITMAP)SelectObject(hMem, hBmp);
|
||||||
Gdiplus::Graphics graphics(hMem);
|
Gdiplus::Graphics graphics(hMem);
|
||||||
|
graphics.SetInterpolationMode(Gdiplus::InterpolationModeHighQuality);
|
||||||
graphics.DrawImage(pImage, (INT)roi2.left, (INT)roi2.top,
|
graphics.DrawImage(pImage, (INT)roi2.left, (INT)roi2.top,
|
||||||
(INT)(roi2.right - roi2.left), (INT)(roi2.bottom - roi2.top));
|
(INT)(roi2.right - roi2.left), (INT)(roi2.bottom - roi2.top));
|
||||||
SelectObject(hMem, hOldBmp);
|
SelectObject(hMem, hOldBmp);
|
||||||
|
|
Loading…
Reference in New Issue