From 6ec6a43ac4d28c2e548d4df3d728ee36d7208cec Mon Sep 17 00:00:00 2001
From: doom4ster <doom4ster@gmail.com>
Date: 星期五, 22 十二月 2017 11:24:09 +0800
Subject: [PATCH] CB_IMGPSScan.cab ver2.0.1.61 灰階影像轉向

---
 CB_IMGPSScanImp.pas |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/CB_IMGPSScanImp.pas b/CB_IMGPSScanImp.pas
index 4cc7328..e717c12 100644
--- a/CB_IMGPSScanImp.pas
+++ b/CB_IMGPSScanImp.pas
@@ -4323,14 +4323,14 @@
           end;
         end;
         pScanInfo^.Graphic.Compression := tcJpeg;
-        pScanInfo^.Graphic.JpegQuality := 70;
+        pScanInfo^.Graphic.JpegQuality := FJpgCompression;
     end
     else if pScanInfo^.Graphic.ImageFormat = ifColor256 Then
     begin
       //Ext := '.jpg';
       ConvertToGray(pScanInfo^.Graphic);
       pScanInfo^.Graphic.Compression := tcJpeg;
-      pScanInfo^.Graphic.JpegQuality := 70;
+      pScanInfo^.Graphic.JpegQuality := FJpgCompression;
     end
     else if pScanInfo^.Graphic.ImageFormat = ifGray256 Then
     begin
@@ -4348,7 +4348,7 @@
         end;
       end;
       pScanInfo^.Graphic.Compression := tcJpeg;
-      pScanInfo^.Graphic.JpegQuality := 70;
+      pScanInfo^.Graphic.JpegQuality := FJpgCompression;
     end
     else
     begin
@@ -4381,6 +4381,10 @@
     end;
     //iGraphic.Assign(iGraphic_First);
     iGraphic := iGraphic_First;
+
+
+
+
     while not iGraphic.IsEmpty do
     begin
       //Application.ProcessMessages;
@@ -4390,6 +4394,14 @@
         ImageScrollBox1NewGraphic(ImageScrollBox1.Graphic);
 
         MpsGetBarcode(ISB_BW.Graphic,MpsBarcodeinf);
+        For i := 1 To MpsBarcodeinf.Count Do
+        Begin
+          If MpsBarcodeinf.r180[i] <> 0 Then // 依條碼角度轉影像
+          Begin
+            Rotate(iGraphic, MpsBarcodeinf.r180[i]);
+            Break;
+          End;
+        End;
         PageEnd;
         IF PEFileName <> '' Then
         begin
@@ -4414,7 +4426,7 @@
             JpgGr := TJpegGraphic.Create;
             try
               JpgGr.Assign(iGraphic);
-              JpgGr.SaveQuality := 30;
+              JpgGr.SaveQuality := FJpgCompression;
               //JpgGr.AppendToStream(SaveStream);
               JpgGr.SaveToFile(PEFileName);
             finally

--
Gitblit v1.8.0