From d4766570213da15eab20b301c04369bd0b829b4c Mon Sep 17 00:00:00 2001 From: yangjiaxuan <171295266@qq.com> Date: Wed, 1 Mar 2023 17:27:13 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=9B=BE=E5=83=8F=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E6=A0=8F=E7=9A=84=E8=B0=83=E6=95=B4=E4=BA=AE=E5=BA=A6?= =?UTF-8?q?=E7=AD=89=E5=8A=9F=E8=83=BD=E5=AF=BC=E8=87=B4=E7=9A=84=E5=9B=BE?= =?UTF-8?q?=E5=83=8F=E4=BF=A1=E6=81=AF=E4=B8=8D=E6=AD=A3=E7=A1=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scanner/mainwindow.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/app/scanner/mainwindow.cpp b/app/scanner/mainwindow.cpp index 593ce759..f57e1f7a 100644 --- a/app/scanner/mainwindow.cpp +++ b/app/scanner/mainwindow.cpp @@ -1908,16 +1908,26 @@ void MainWindow::on_act_adjust_triggered() return; } + HGUInt xDpi = 0; + HGUInt yDpi = 0; + HGBase_GetImageDpi(img, &xDpi, &yDpi); + Dialog_ImgProc_Adjust dlg(img, this); connect(&dlg, SIGNAL(applyToImage(HGImage)), this, SLOT(on_dialog_adjust_applyToImage(HGImage))); + + HGImage image = NULL; if (dlg.exec()) { - m_view->addImage(dlg.getAfterImage()); + image = dlg.getAfterImage(); + HGBase_SetImageDpi(image, xDpi, yDpi); + m_view->addImage(image); m_modify = true; } else { - m_view->addImage(dlg.getBeforeImage()); + image = dlg.getBeforeImage(); + HGBase_SetImageDpi(image, xDpi, yDpi); + m_view->addImage(image); } updateStatusBarPixelInfo();