解决用twain扫描图像,dpi少1的问题
This commit is contained in:
parent
5055a539dc
commit
a7fe3e00ee
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue