This commit is contained in:
yangjiaxuan 2023-07-19 16:45:54 +08:00
commit 23786ed849
1 changed files with 2 additions and 2 deletions

View File

@ -558,8 +558,8 @@ static HGResult LoadGdiImage(Gdiplus::Image* pImage, const HGImageRoi* roi, HGUI
if (HGBASE_ERR_OK == ret) if (HGBASE_ERR_OK == ret)
{ {
HGUInt xDpi = (HGUInt)pImage->GetHorizontalResolution(); HGUInt xDpi = (HGUInt)((double)pImage->GetHorizontalResolution() + 0.5);
HGUInt yDpi = (HGUInt)pImage->GetVerticalResolution(); HGUInt yDpi = (HGUInt)((double)pImage->GetVerticalResolution() + 0.5);
HGBase_SetImageDpi(*image, xDpi, yDpi); HGBase_SetImageDpi(*image, xDpi, yDpi);
} }