Compare commits

...

5 Commits

6 changed files with 22 additions and 2 deletions

View File

@ -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();
@ -2862,6 +2872,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 +2930,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;

View File

@ -539,6 +539,7 @@
<Add option="-B direct" />
<Add option="-static-libgcc" />
<Add option="-static-libstdc++" />
<Add option="-Wl,-rpath=." />
</Linker>
<Unit filename="../../../modules/imgfmt/HGBmp.cpp" />
<Unit filename="../../../modules/imgfmt/HGBmp.h" />

View File

@ -557,6 +557,7 @@
<Add option="-B direct" />
<Add option="-static-libgcc" />
<Add option="-static-libstdc++" />
<Add option="-Wl,-rpath=." />
</Linker>
<Unit filename="../../../modules/imgproc/CvxText.cpp" />
<Unit filename="../../../modules/imgproc/CvxText.hpp" />

View File

@ -335,6 +335,7 @@
<Add option="-B direct" />
<Add option="-static-libgcc" />
<Add option="-static-libstdc++" />
<Add option="-Wl,-rpath=." />
</Linker>
<Unit filename="../../../sdk/scannerlib/HGLibDeviceImpl.cpp" />
<Unit filename="../../../sdk/scannerlib/HGLibDeviceImpl.hpp" />

View File

@ -235,6 +235,7 @@
<Add option="-B direct" />
<Add option="-static-libgcc" />
<Add option="-static-libstdc++" />
<Add option="-Wl,-rpath=." />
</Linker>
<Unit filename="../../../modules/base/HGConsole.cpp" />
<Unit filename="../../../modules/base/HGConsole.h" />

View File

@ -332,6 +332,7 @@
<Add option="-B direct" />
<Add option="-static-libgcc" />
<Add option="-static-libstdc++" />
<Add option="-Wl,-rpath=." />
</Linker>
<Unit filename="../../../modules/version/HGVersion.cpp" />
<Unit filename="../../../modules/version/HGVersion.h" />