解决用twain扫描图像,dpi少1的问题

This commit is contained in:
luoliangyi 2023-07-19 14:59:03 +08:00
parent 5055a539dc
commit a7fe3e00ee
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)
{
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);
}