解决图像裁剪后图像dpi不正确
This commit is contained in:
parent
e4990ab7e4
commit
2a113d52ec
|
@ -2862,6 +2862,10 @@ void MainWindow::on_act_autoCrop_triggered()
|
|||
return;
|
||||
}
|
||||
|
||||
HGUInt xDpi = 0;
|
||||
HGUInt yDpi = 0;
|
||||
HGBase_GetImageDpi(img, &xDpi, &yDpi);
|
||||
|
||||
Dialog_ImgProc_AutoCrop dlg(this);
|
||||
if (dlg.exec())
|
||||
{
|
||||
|
@ -2916,6 +2920,7 @@ void MainWindow::on_act_autoCrop_triggered()
|
|||
imgInfo.type, HGBASE_IMGORIGIN_TOP, &destImage);
|
||||
if (nullptr != destImage)
|
||||
{
|
||||
HGBase_SetImageDpi(destImage, xDpi, yDpi);
|
||||
m_view->addImage(destImage);
|
||||
HGBase_DestroyImage(destImage);
|
||||
m_modify = true;
|
||||
|
|
Loading…
Reference in New Issue