调整自动裁剪功能
This commit is contained in:
parent
cf64d5de55
commit
ecc0231097
|
@ -2537,6 +2537,8 @@ void MainWindow::on_act_autoCrop_triggered()
|
|||
int indent = dlg.getIndent();
|
||||
|
||||
HGImgAutoCropParam autoCropParam;
|
||||
autoCropParam.normalCrop = HGFALSE;
|
||||
autoCropParam.dispersion = HGTRUE;
|
||||
|
||||
if (isFillBlank)
|
||||
{
|
||||
|
@ -2562,11 +2564,16 @@ void MainWindow::on_act_autoCrop_triggered()
|
|||
autoCropParam.indent = 5;
|
||||
}
|
||||
|
||||
if (isCrop || isDeskew || isFillBlank)
|
||||
{
|
||||
HGImageInfo imgInfo;
|
||||
HGBase_GetImageInfo(img, &imgInfo);
|
||||
|
||||
HGImage destImage = nullptr;
|
||||
HGImgProc_ImageAutoCrop(img, (HGBool)isCrop, (HGBool)isDeskew, (HGBool)isFillBlank, &autoCropParam, imgInfo.width, imgInfo.height,
|
||||
HGUInt destWidth = imgInfo.width;
|
||||
HGUInt destHeight = imgInfo.height;
|
||||
|
||||
HGImgProc_ImageAutoCrop(img, (HGBool)isCrop, (HGBool)isDeskew, (HGBool)isFillBlank, &autoCropParam, destWidth, destHeight,
|
||||
imgInfo.type, HGBASE_IMGORIGIN_TOP, &destImage);
|
||||
if (nullptr != destImage)
|
||||
{
|
||||
|
@ -2578,6 +2585,7 @@ void MainWindow::on_act_autoCrop_triggered()
|
|||
updateActionStatus();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_act_signIn_triggered()
|
||||
|
|
Loading…
Reference in New Issue