diff --git a/modules/base/HGImage.cpp b/modules/base/HGImage.cpp index ef94d80d..02718195 100644 --- a/modules/base/HGImage.cpp +++ b/modules/base/HGImage.cpp @@ -558,8 +558,8 @@ static HGResult LoadGdiImage(Gdiplus::Image* pImage, const HGImageRoi* roi, HGUI if (HGBASE_ERR_OK == ret) { - HGUInt xDpi = (HGUInt)pImage->GetHorizontalResolution(); - HGUInt yDpi = (HGUInt)pImage->GetVerticalResolution(); + HGUInt xDpi = (HGUInt)((double)pImage->GetHorizontalResolution() + 0.5); + HGUInt yDpi = (HGUInt)((double)pImage->GetVerticalResolution() + 0.5); HGBase_SetImageDpi(*image, xDpi, yDpi); }