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