From 1f5ec3f907289964bfa9cc91796b459f9bcf492c Mon Sep 17 00:00:00 2001 From: yangjiaxuan <171295266@qq.com> Date: Tue, 7 Jun 2022 11:55:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E5=A4=9A=E9=A1=B5=E6=97=8B?= =?UTF-8?q?=E8=BD=AC=E5=AF=BC=E5=87=BApdf=E7=9A=84=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E5=B0=BA=E5=AF=B8=E4=B8=8D=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scanner/dialog_multirotateimagefile.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/scanner/dialog_multirotateimagefile.cpp b/app/scanner/dialog_multirotateimagefile.cpp index fa1e1268..048949bd 100644 --- a/app/scanner/dialog_multirotateimagefile.cpp +++ b/app/scanner/dialog_multirotateimagefile.cpp @@ -68,6 +68,11 @@ void Dialog_MultiRotateImageFile::ThreadFunc(HGThread thread, HGPointer param) { HGImage img2 = nullptr; HGBase_CreateImage(imgInfo.height, imgInfo.width, imgInfo.type, imgInfo.origin, &img2); + + HGUInt xDpi, yDpi; + HGBase_GetImageDpi(img, &xDpi, &yDpi); + HGBase_SetImageDpi(img2, xDpi, yDpi); + HGBase_ImageRotateLeft(img, img2); HGBase_DestroyImage(img); img = img2; @@ -80,6 +85,11 @@ void Dialog_MultiRotateImageFile::ThreadFunc(HGThread thread, HGPointer param) { HGImage img2 = nullptr; HGBase_CreateImage(imgInfo.height, imgInfo.width, imgInfo.type, imgInfo.origin, &img2); + + HGUInt xDpi, yDpi; + HGBase_GetImageDpi(img, &xDpi, &yDpi); + HGBase_SetImageDpi(img2, xDpi, yDpi); + HGBase_ImageRotateRight(img, img2); HGBase_DestroyImage(img); img = img2;