微调加载图像质量

This commit is contained in:
yangjiaxuan 2024-01-10 17:59:58 +08:00
parent 3a9059c048
commit 570cc3f686
1 changed files with 1 additions and 0 deletions

View File

@ -530,6 +530,7 @@ static HGResult LoadGdiImage(Gdiplus::Image* pImage, const HGImageRoi* roi, HGUI
HDC hMem = CreateCompatibleDC(NULL);
HBITMAP hOldBmp = (HBITMAP)SelectObject(hMem, hBmp);
Gdiplus::Graphics graphics(hMem);
graphics.SetInterpolationMode(Gdiplus::InterpolationModeHighQuality);
graphics.DrawImage(pImage, (INT)roi2.left, (INT)roi2.top,
(INT)(roi2.right - roi2.left), (INT)(roi2.bottom - roi2.top));
SelectObject(hMem, hOldBmp);