将导出多页gif单独处理,微调保存功能

This commit is contained in:
yangjiaxuan 2023-06-25 16:57:35 +08:00
parent b79c6b2ebd
commit 7cf63691ce
9 changed files with 397 additions and 287 deletions

Binary file not shown.

View File

@ -584,9 +584,9 @@ Page range will be "Chosen Pages".
</message>
<message>
<location filename="dialog_export.ui" line="137"/>
<source>Save as multipages (TIFF/PDF/OFD/GIF)</source>
<oldsource>Save as multipages (TIFF/PDF/OFD)</oldsource>
<translation>(TIFF/PDF/OFD/GIF)</translation>
<source>Save as multipages (TIFF/PDF/OFD/GIF/RTF)</source>
<oldsource>Save as multipages (TIFF/PDF/OFD/GIF)</oldsource>
<translation>(TIFF/PDF/OFD/GIF/RTF)</translation>
</message>
<message>
<location filename="dialog_export.cpp" line="119"/>
@ -636,17 +636,17 @@ Page range will be &apos;Chosen Pages&apos;.</source>
<translation></translation>
</message>
<message>
<location filename="dialog_exportimagefile.cpp" line="346"/>
<location filename="dialog_exportimagefile.cpp" line="378"/>
<source>export failed: </source>
<translation> </translation>
</message>
<message>
<location filename="dialog_exportimagefile.cpp" line="347"/>
<location filename="dialog_exportimagefile.cpp" line="379"/>
<source>tip</source>
<translation></translation>
</message>
<message>
<location filename="dialog_exportimagefile.cpp" line="346"/>
<location filename="dialog_exportimagefile.cpp" line="378"/>
<source>export succeed</source>
<translation></translation>
</message>
@ -1654,27 +1654,32 @@ Please make sure the two passwords are the same.</source>
<translation>OCR类型</translation>
</message>
<message>
<location filename="dialog_saveas.cpp" line="119"/>
<location filename="dialog_saveas.cpp" line="71"/>
<source>Save</source>
<translation></translation>
</message>
<message>
<location filename="dialog_saveas.cpp" line="124"/>
<source>English</source>
<translation></translation>
</message>
<message>
<location filename="dialog_saveas.cpp" line="119"/>
<location filename="dialog_saveas.cpp" line="124"/>
<source>Simplified Chinese</source>
<translation>()</translation>
</message>
<message>
<location filename="dialog_saveas.cpp" line="119"/>
<location filename="dialog_saveas.cpp" line="124"/>
<source>Traditional Chinese</source>
<translation>()</translation>
</message>
<message>
<location filename="dialog_saveas.cpp" line="119"/>
<location filename="dialog_saveas.cpp" line="124"/>
<source>Japanese</source>
<translation></translation>
</message>
<message>
<location filename="dialog_saveas.cpp" line="119"/>
<location filename="dialog_saveas.cpp" line="124"/>
<source>Korean</source>
<translation></translation>
</message>
@ -2406,8 +2411,8 @@ bug description:
<location filename="mainwindow.cpp" line="784"/>
<location filename="mainwindow.cpp" line="1607"/>
<location filename="mainwindow.cpp" line="1630"/>
<location filename="mainwindow.cpp" line="2417"/>
<location filename="mainwindow.cpp" line="2714"/>
<location filename="mainwindow.cpp" line="2420"/>
<location filename="mainwindow.cpp" line="2717"/>
<source>Question</source>
<translation></translation>
</message>
@ -2516,14 +2521,14 @@ Do you want to clear?</source>
</message>
<message>
<location filename="mainwindow.cpp" line="334"/>
<location filename="mainwindow.cpp" line="2867"/>
<location filename="mainwindow.cpp" line="3884"/>
<location filename="mainwindow.cpp" line="2870"/>
<location filename="mainwindow.cpp" line="3887"/>
<source>Please go to &apos;Menu Bar -&gt;Scan&apos; to select a device</source>
<translation>-&gt;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="667"/>
<location filename="mainwindow.cpp" line="3612"/>
<location filename="mainwindow.cpp" line="3615"/>
<source>default scheme</source>
<translation></translation>
</message>
@ -2548,127 +2553,127 @@ Do you want to clear?</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2070"/>
<location filename="mainwindow.cpp" line="2134"/>
<location filename="mainwindow.cpp" line="2209"/>
<location filename="mainwindow.cpp" line="2073"/>
<location filename="mainwindow.cpp" line="2137"/>
<location filename="mainwindow.cpp" line="2212"/>
<source>save succeed</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2081"/>
<location filename="mainwindow.cpp" line="2220"/>
<location filename="mainwindow.cpp" line="2084"/>
<location filename="mainwindow.cpp" line="2223"/>
<source>find savePath in thumbnail</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2244"/>
<location filename="mainwindow.cpp" line="2247"/>
<source>Please select at least one picture before export</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2305"/>
<location filename="mainwindow.cpp" line="2308"/>
<source>File name</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2305"/>
<location filename="mainwindow.cpp" line="2308"/>
<source>File path</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2305"/>
<location filename="mainwindow.cpp" line="2308"/>
<source>File size</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2305"/>
<location filename="mainwindow.cpp" line="2308"/>
<source>Creation date/time</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2305"/>
<location filename="mainwindow.cpp" line="2308"/>
<source>Modified date/time</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2305"/>
<location filename="mainwindow.cpp" line="2308"/>
<source>Accessed date/time</source>
<translation>访</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2348"/>
<location filename="mainwindow.cpp" line="2351"/>
<source>Format</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2348"/>
<location filename="mainwindow.cpp" line="2351"/>
<source>Width</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2348"/>
<location filename="mainwindow.cpp" line="2351"/>
<source>Height</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2348"/>
<location filename="mainwindow.cpp" line="2351"/>
<source>depth</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2348"/>
<location filename="mainwindow.cpp" line="2351"/>
<source>Color model</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2348"/>
<location filename="mainwindow.cpp" line="2351"/>
<source>DPI</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2348"/>
<location filename="mainwindow.cpp" line="2351"/>
<source>Print size</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2348"/>
<location filename="mainwindow.cpp" line="2351"/>
<source>Frame</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2362"/>
<location filename="mainwindow.cpp" line="2365"/>
<source>None</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2362"/>
<location filename="mainwindow.cpp" line="2365"/>
<source>Mono</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2362"/>
<location filename="mainwindow.cpp" line="2365"/>
<source>Gray</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2362"/>
<location filename="mainwindow.cpp" line="2365"/>
<source>Color</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2366"/>
<location filename="mainwindow.cpp" line="2369"/>
<source>Not supported</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2394"/>
<location filename="mainwindow.cpp" line="2397"/>
<source>Warning</source>
<translation>
</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2394"/>
<location filename="mainwindow.cpp" line="2397"/>
<source>Device is Running!
Please finish scanning first.</source>
<translation>
@ -2676,48 +2681,48 @@ Please finish scanning first.</source>
</message>
<message>
<location filename="mainwindow.cpp" line="1241"/>
<location filename="mainwindow.cpp" line="2867"/>
<location filename="mainwindow.cpp" line="3656"/>
<location filename="mainwindow.cpp" line="2870"/>
<location filename="mainwindow.cpp" line="3659"/>
<source>Prompt</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2881"/>
<location filename="mainwindow.cpp" line="2884"/>
<source>&lt;p&gt;DriverVer: %1&lt;/p&gt;</source>
<translation>&lt;p&gt;: %1&lt;/p&gt;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2882"/>
<location filename="mainwindow.cpp" line="2885"/>
<source>&lt;p&gt;Vendor: %1&lt;/p&gt;</source>
<translation>&lt;p&gt;: %1&lt;/p&gt;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2883"/>
<location filename="mainwindow.cpp" line="2886"/>
<source>&lt;p&gt;Copyright: %1&lt;/p&gt;</source>
<translation>&lt;p&gt;: %1&lt;/p&gt;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2884"/>
<location filename="mainwindow.cpp" line="2887"/>
<source>&lt;p&gt;Company website: &lt;a href=%1&gt;%1&lt;/p&gt;</source>
<translation>&lt;p&gt;: &lt;a href=%1&gt;%1&lt;/p&gt;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2885"/>
<location filename="mainwindow.cpp" line="2888"/>
<source>&lt;p&gt;Company address: %1&lt;/p&gt;</source>
<translation>&lt;p&gt;: %1&lt;/p&gt;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2886"/>
<location filename="mainwindow.cpp" line="2889"/>
<source>&lt;p&gt;Company telephone: %1&lt;/p&gt;</source>
<translation>&lt;p&gt;: %1&lt;/p&gt;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2887"/>
<location filename="mainwindow.cpp" line="2890"/>
<source>&lt;p&gt;Company GPS: &lt;a href=%1&gt;%2&lt;/p&gt;</source>
<translation>&lt;p&gt;: &lt;a href=%1&gt;%2&lt;/p&gt;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2887"/>
<location filename="mainwindow.cpp" line="2890"/>
<source>Baidu map access</source>
<translation>访</translation>
</message>
@ -2739,7 +2744,7 @@ Please finish scanning first.</source>
</message>
<message>
<location filename="mainwindow.cpp" line="389"/>
<location filename="mainwindow.cpp" line="3892"/>
<location filename="mainwindow.cpp" line="3895"/>
<source>Device %1 is open</source>
<translation> %1 </translation>
</message>
@ -2748,76 +2753,76 @@ Please finish scanning first.</source>
<translation type="obsolete"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3386"/>
<location filename="mainwindow.cpp" line="3389"/>
<source>cache path folder limit:%1</source>
<translation>访%1
</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3390"/>
<location filename="mainwindow.cpp" line="3393"/>
<source>aquireinto folder limit:%1</source>
<translation>访%1
</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3474"/>
<location filename="mainwindow.cpp" line="3477"/>
<source>Image processing failed</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3478"/>
<location filename="mainwindow.cpp" line="3481"/>
<source>Ocr init failed</source>
<translation>OCR初始化错误</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3482"/>
<location filename="mainwindow.cpp" line="3485"/>
<source>Ocr failed</source>
<translation>OCR错误</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3486"/>
<location filename="mainwindow.cpp" line="3489"/>
<source>File does not exist</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3490"/>
<location filename="mainwindow.cpp" line="3493"/>
<source>Failed to load dynamic library</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3494"/>
<location filename="mainwindow.cpp" line="3497"/>
<source>File data error</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3498"/>
<location filename="mainwindow.cpp" line="3501"/>
<source>Image format processing error</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3502"/>
<location filename="mainwindow.cpp" line="3505"/>
<source>Out of memory</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3506"/>
<location filename="mainwindow.cpp" line="3509"/>
<source>Failed</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3656"/>
<location filename="mainwindow.cpp" line="3659"/>
<source>The Device has reached roller life</source>
<translation>使
</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3802"/>
<location filename="mainwindow.cpp" line="3821"/>
<location filename="mainwindow.cpp" line="3805"/>
<location filename="mainwindow.cpp" line="3824"/>
<source>The language switch is successful and takes effect the next time the software is started!</source>
<translation>!</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3859"/>
<location filename="mainwindow.cpp" line="3862"/>
<source>Are you sure to delete selected file?</source>
<translation></translation>
</message>
@ -2835,7 +2840,7 @@ Please finish scanning first.</source>
</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3470"/>
<location filename="mainwindow.cpp" line="3473"/>
<source>Insufficient access rights</source>
<translation>访</translation>
</message>
@ -2860,18 +2865,18 @@ Please finish scanning first.</source>
<translation type="vanished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3744"/>
<location filename="mainwindow.cpp" line="3747"/>
<source>tip</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3744"/>
<location filename="mainwindow.cpp" line="3747"/>
<source>Other versions not available</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3764"/>
<location filename="mainwindow.cpp" line="3780"/>
<location filename="mainwindow.cpp" line="3767"/>
<location filename="mainwindow.cpp" line="3783"/>
<source>The device does not support this operation</source>
<translation></translation>
</message>
@ -2880,8 +2885,8 @@ Please finish scanning first.</source>
<translation type="vanished">IO错误</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3355"/>
<location filename="mainwindow.cpp" line="3393"/>
<location filename="mainwindow.cpp" line="3358"/>
<location filename="mainwindow.cpp" line="3396"/>
<source>error</source>
<translation></translation>
</message>
@ -2896,7 +2901,7 @@ Continue to close?</source>
</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2715"/>
<location filename="mainwindow.cpp" line="2718"/>
<source>Sure to sign out administrator account?</source>
<translation></translation>
</message>
@ -3096,12 +3101,12 @@ Continue to close?</source>
<translation type="vanished"> </translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2075"/>
<location filename="mainwindow.cpp" line="2076"/>
<location filename="mainwindow.cpp" line="2139"/>
<location filename="mainwindow.cpp" line="2140"/>
<location filename="mainwindow.cpp" line="2214"/>
<location filename="mainwindow.cpp" line="2215"/>
<location filename="mainwindow.cpp" line="2078"/>
<location filename="mainwindow.cpp" line="2079"/>
<location filename="mainwindow.cpp" line="2142"/>
<location filename="mainwindow.cpp" line="2143"/>
<location filename="mainwindow.cpp" line="2217"/>
<location filename="mainwindow.cpp" line="2218"/>
<source>save image doc failed: </source>
<translation> </translation>
</message>
@ -3140,17 +3145,17 @@ Continue to close?</source>
<translation type="vanished">: %1</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3170"/>
<location filename="mainwindow.cpp" line="3173"/>
<source>Detected that there is less than 1GB of disk space. Do you want to continue?</source>
<translation>1GB?</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3356"/>
<location filename="mainwindow.cpp" line="3359"/>
<source>start failed!</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2418"/>
<location filename="mainwindow.cpp" line="2421"/>
<source>There are pictures that have not been saved.
Are you sure to close?</source>
<translation></translation>
@ -3160,39 +3165,39 @@ Are you sure to close?</source>
<translation type="vanished"> : %1</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2070"/>
<location filename="mainwindow.cpp" line="2075"/>
<location filename="mainwindow.cpp" line="2081"/>
<location filename="mainwindow.cpp" line="2134"/>
<location filename="mainwindow.cpp" line="2139"/>
<location filename="mainwindow.cpp" line="2209"/>
<location filename="mainwindow.cpp" line="2214"/>
<location filename="mainwindow.cpp" line="2220"/>
<location filename="mainwindow.cpp" line="2244"/>
<location filename="mainwindow.cpp" line="2429"/>
<location filename="mainwindow.cpp" line="2778"/>
<location filename="mainwindow.cpp" line="2782"/>
<location filename="mainwindow.cpp" line="3170"/>
<location filename="mainwindow.cpp" line="3764"/>
<location filename="mainwindow.cpp" line="3780"/>
<location filename="mainwindow.cpp" line="3801"/>
<location filename="mainwindow.cpp" line="3820"/>
<location filename="mainwindow.cpp" line="3859"/>
<location filename="mainwindow.cpp" line="2073"/>
<location filename="mainwindow.cpp" line="2078"/>
<location filename="mainwindow.cpp" line="2084"/>
<location filename="mainwindow.cpp" line="2137"/>
<location filename="mainwindow.cpp" line="2142"/>
<location filename="mainwindow.cpp" line="2212"/>
<location filename="mainwindow.cpp" line="2217"/>
<location filename="mainwindow.cpp" line="2223"/>
<location filename="mainwindow.cpp" line="2247"/>
<location filename="mainwindow.cpp" line="2432"/>
<location filename="mainwindow.cpp" line="2781"/>
<location filename="mainwindow.cpp" line="2785"/>
<location filename="mainwindow.cpp" line="3173"/>
<location filename="mainwindow.cpp" line="3767"/>
<location filename="mainwindow.cpp" line="3783"/>
<location filename="mainwindow.cpp" line="3804"/>
<location filename="mainwindow.cpp" line="3823"/>
<location filename="mainwindow.cpp" line="3862"/>
<source>tips</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2430"/>
<location filename="mainwindow.cpp" line="2433"/>
<source>Are you sure to close?</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2766"/>
<location filename="mainwindow.cpp" line="2769"/>
<source>confirm operation</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2767"/>
<location filename="mainwindow.cpp" line="2770"/>
<source>are you sure to clear the roller count?</source>
<translation></translation>
</message>
@ -3201,22 +3206,22 @@ Are you sure to close?</source>
<translation type="vanished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2778"/>
<location filename="mainwindow.cpp" line="2781"/>
<source>Roller scanned count has been set to 0.</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2782"/>
<location filename="mainwindow.cpp" line="2785"/>
<source>Roller scanned count reset failed.</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2858"/>
<location filename="mainwindow.cpp" line="2861"/>
<source>Error</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2858"/>
<location filename="mainwindow.cpp" line="2861"/>
<source>Document missing! It would be deleted or renamed.</source>
<translation></translation>
</message>
@ -3257,7 +3262,7 @@ Are you sure to close?</source>
<translation type="vanished">&lt;p&gt;%1&lt;/p&gt;&lt;p&gt;: %2&lt;br&gt;: &amp;#169; %3&lt;/p&gt;&lt;p&gt;%4%5%6%7%8%9&lt;/p&gt;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2879"/>
<location filename="mainwindow.cpp" line="2882"/>
<source>about %1</source>
<translation> %1</translation>
</message>

Binary file not shown.

View File

@ -572,8 +572,9 @@ The page range will be “selected pages”</translation>
</message>
<message>
<location filename="dialog_export.ui" line="137"/>
<source>Save as multipages (TIFF/PDF/OFD/GIF)</source>
<translation>Save multiple pages(TIFF/PDF/OFD/GIF)</translation>
<source>Save as multipages (TIFF/PDF/OFD/GIF/RTF)</source>
<oldsource>Save as multipages (TIFF/PDF/OFD/GIF)</oldsource>
<translation>Save as multipages (TIFF/PDF/OFD/GIF/RTF)</translation>
</message>
<message>
<location filename="dialog_export.ui" line="144"/>
@ -641,17 +642,17 @@ The page range will be “selected pages”</translation>
<translation>Stop exporting</translation>
</message>
<message>
<location filename="dialog_exportimagefile.cpp" line="346"/>
<location filename="dialog_exportimagefile.cpp" line="378"/>
<source>export succeed</source>
<translation>Export completed</translation>
</message>
<message>
<location filename="dialog_exportimagefile.cpp" line="346"/>
<location filename="dialog_exportimagefile.cpp" line="378"/>
<source>export failed: </source>
<translation>Export failed: </translation>
</message>
<message>
<location filename="dialog_exportimagefile.cpp" line="347"/>
<location filename="dialog_exportimagefile.cpp" line="379"/>
<source>tip</source>
<translation>Prompt</translation>
</message>
@ -1594,27 +1595,32 @@ Please make sure the two passwords are the same.</source>
<translation>OCR type:</translation>
</message>
<message>
<location filename="dialog_saveas.cpp" line="119"/>
<location filename="dialog_saveas.cpp" line="71"/>
<source>Save</source>
<translation>Save</translation>
</message>
<message>
<location filename="dialog_saveas.cpp" line="124"/>
<source>English</source>
<translation>English</translation>
</message>
<message>
<location filename="dialog_saveas.cpp" line="119"/>
<location filename="dialog_saveas.cpp" line="124"/>
<source>Simplified Chinese</source>
<translation>Simplified Chinese</translation>
</message>
<message>
<location filename="dialog_saveas.cpp" line="119"/>
<location filename="dialog_saveas.cpp" line="124"/>
<source>Traditional Chinese</source>
<translation>Traditional Chinese</translation>
</message>
<message>
<location filename="dialog_saveas.cpp" line="119"/>
<location filename="dialog_saveas.cpp" line="124"/>
<source>Japanese</source>
<translation>Japanese</translation>
</message>
<message>
<location filename="dialog_saveas.cpp" line="119"/>
<location filename="dialog_saveas.cpp" line="124"/>
<source>Korean</source>
<translation>Korean</translation>
</message>
@ -2355,8 +2361,8 @@ Please make sure the two passwords are the same.</source>
<location filename="mainwindow.cpp" line="784"/>
<location filename="mainwindow.cpp" line="1607"/>
<location filename="mainwindow.cpp" line="1630"/>
<location filename="mainwindow.cpp" line="2417"/>
<location filename="mainwindow.cpp" line="2714"/>
<location filename="mainwindow.cpp" line="2420"/>
<location filename="mainwindow.cpp" line="2717"/>
<source>Question</source>
<translation>Ask</translation>
</message>
@ -2429,12 +2435,12 @@ Please reselect a path or clear disk space immediately.</translation>
<translation type="vanished">Failed to create image file: </translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2075"/>
<location filename="mainwindow.cpp" line="2076"/>
<location filename="mainwindow.cpp" line="2139"/>
<location filename="mainwindow.cpp" line="2140"/>
<location filename="mainwindow.cpp" line="2214"/>
<location filename="mainwindow.cpp" line="2215"/>
<location filename="mainwindow.cpp" line="2078"/>
<location filename="mainwindow.cpp" line="2079"/>
<location filename="mainwindow.cpp" line="2142"/>
<location filename="mainwindow.cpp" line="2143"/>
<location filename="mainwindow.cpp" line="2217"/>
<location filename="mainwindow.cpp" line="2218"/>
<source>save image doc failed: </source>
<translation>Failed to save image: </translation>
</message>
@ -2445,8 +2451,8 @@ Please reselect a path or clear disk space immediately.</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="334"/>
<location filename="mainwindow.cpp" line="2867"/>
<location filename="mainwindow.cpp" line="3884"/>
<location filename="mainwindow.cpp" line="2870"/>
<location filename="mainwindow.cpp" line="3887"/>
<source>Please go to &apos;Menu Bar -&gt;Scan&apos; to select a device</source>
<translation>Please go to &apos;Menu Bar -&gt;Scan&apos; to select a device</translation>
</message>
@ -2471,7 +2477,7 @@ Please reselect a path or clear disk space immediately.</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="667"/>
<location filename="mainwindow.cpp" line="3612"/>
<location filename="mainwindow.cpp" line="3615"/>
<source>default scheme</source>
<translation>Default scheme</translation>
</message>
@ -2531,218 +2537,218 @@ Clear?</translation>
<translation>Insert image</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2070"/>
<location filename="mainwindow.cpp" line="2075"/>
<location filename="mainwindow.cpp" line="2081"/>
<location filename="mainwindow.cpp" line="2134"/>
<location filename="mainwindow.cpp" line="2139"/>
<location filename="mainwindow.cpp" line="2209"/>
<location filename="mainwindow.cpp" line="2214"/>
<location filename="mainwindow.cpp" line="2220"/>
<location filename="mainwindow.cpp" line="2244"/>
<location filename="mainwindow.cpp" line="2429"/>
<location filename="mainwindow.cpp" line="2778"/>
<location filename="mainwindow.cpp" line="2782"/>
<location filename="mainwindow.cpp" line="3170"/>
<location filename="mainwindow.cpp" line="3764"/>
<location filename="mainwindow.cpp" line="3780"/>
<location filename="mainwindow.cpp" line="3801"/>
<location filename="mainwindow.cpp" line="3820"/>
<location filename="mainwindow.cpp" line="3859"/>
<location filename="mainwindow.cpp" line="2073"/>
<location filename="mainwindow.cpp" line="2078"/>
<location filename="mainwindow.cpp" line="2084"/>
<location filename="mainwindow.cpp" line="2137"/>
<location filename="mainwindow.cpp" line="2142"/>
<location filename="mainwindow.cpp" line="2212"/>
<location filename="mainwindow.cpp" line="2217"/>
<location filename="mainwindow.cpp" line="2223"/>
<location filename="mainwindow.cpp" line="2247"/>
<location filename="mainwindow.cpp" line="2432"/>
<location filename="mainwindow.cpp" line="2781"/>
<location filename="mainwindow.cpp" line="2785"/>
<location filename="mainwindow.cpp" line="3173"/>
<location filename="mainwindow.cpp" line="3767"/>
<location filename="mainwindow.cpp" line="3783"/>
<location filename="mainwindow.cpp" line="3804"/>
<location filename="mainwindow.cpp" line="3823"/>
<location filename="mainwindow.cpp" line="3862"/>
<source>tips</source>
<translation>prompt</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2070"/>
<location filename="mainwindow.cpp" line="2134"/>
<location filename="mainwindow.cpp" line="2209"/>
<location filename="mainwindow.cpp" line="2073"/>
<location filename="mainwindow.cpp" line="2137"/>
<location filename="mainwindow.cpp" line="2212"/>
<source>save succeed</source>
<translation>Saved successfully</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2081"/>
<location filename="mainwindow.cpp" line="2220"/>
<location filename="mainwindow.cpp" line="2084"/>
<location filename="mainwindow.cpp" line="2223"/>
<source>find savePath in thumbnail</source>
<translation>Image name already exists in the list</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2244"/>
<location filename="mainwindow.cpp" line="2247"/>
<source>Please select at least one picture before export</source>
<translation>Please select at least one image and then export</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2305"/>
<location filename="mainwindow.cpp" line="2308"/>
<source>File name</source>
<translation>File name</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2305"/>
<location filename="mainwindow.cpp" line="2308"/>
<source>File path</source>
<translation>File path</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2305"/>
<location filename="mainwindow.cpp" line="2308"/>
<source>File size</source>
<translation>File size</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2305"/>
<location filename="mainwindow.cpp" line="2308"/>
<source>Creation date/time</source>
<translation>Creation time</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2305"/>
<location filename="mainwindow.cpp" line="2308"/>
<source>Modified date/time</source>
<translation>Modification time</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2305"/>
<location filename="mainwindow.cpp" line="2308"/>
<source>Accessed date/time</source>
<translation>Access time</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2348"/>
<location filename="mainwindow.cpp" line="2351"/>
<source>Format</source>
<translation>Format</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2348"/>
<location filename="mainwindow.cpp" line="2351"/>
<source>Width</source>
<translation>Width</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2348"/>
<location filename="mainwindow.cpp" line="2351"/>
<source>Height</source>
<translation>Height</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2348"/>
<location filename="mainwindow.cpp" line="2351"/>
<source>depth</source>
<translation>Depth</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2348"/>
<location filename="mainwindow.cpp" line="2351"/>
<source>Color model</source>
<translation>Color mode</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2348"/>
<location filename="mainwindow.cpp" line="2351"/>
<source>DPI</source>
<translation>Pixels per inch</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2348"/>
<location filename="mainwindow.cpp" line="2351"/>
<source>Print size</source>
<translation>Print size</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2348"/>
<location filename="mainwindow.cpp" line="2351"/>
<source>Frame</source>
<translation>Frame</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2362"/>
<location filename="mainwindow.cpp" line="2365"/>
<source>None</source>
<translation>None</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2362"/>
<location filename="mainwindow.cpp" line="2365"/>
<source>Mono</source>
<translation>Black and white</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2362"/>
<location filename="mainwindow.cpp" line="2365"/>
<source>Gray</source>
<translation>Gray scale</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2362"/>
<location filename="mainwindow.cpp" line="2365"/>
<source>Color</source>
<translation>Color</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2366"/>
<location filename="mainwindow.cpp" line="2369"/>
<source>Not supported</source>
<translation>Not supported</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2394"/>
<location filename="mainwindow.cpp" line="2397"/>
<source>Warning</source>
<translation>Warning</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2394"/>
<location filename="mainwindow.cpp" line="2397"/>
<source>Device is Running!
Please finish scanning first.</source>
<translation>Device is currently running!
Please stop scanning first.</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2418"/>
<location filename="mainwindow.cpp" line="2421"/>
<source>There are pictures that have not been saved.
Are you sure to close?</source>
<translation>There are unsaved images; are you sure you want to close?</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2430"/>
<location filename="mainwindow.cpp" line="2433"/>
<source>Are you sure to close?</source>
<translation>Are you sure you want to close?</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2715"/>
<location filename="mainwindow.cpp" line="2718"/>
<source>Sure to sign out administrator account?</source>
<translation>Are you sure you want to log out of the administrator account?</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3656"/>
<location filename="mainwindow.cpp" line="3659"/>
<source>The Device has reached roller life</source>
<translation>The paper roller has reached its service life, and the frequency of abnormalities during the scanning process may increase.
Please contact the equipment supplier promptly to purchase a replacement paper roller!</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1241"/>
<location filename="mainwindow.cpp" line="2867"/>
<location filename="mainwindow.cpp" line="3656"/>
<location filename="mainwindow.cpp" line="2870"/>
<location filename="mainwindow.cpp" line="3659"/>
<source>Prompt</source>
<translation>Prompt</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2881"/>
<location filename="mainwindow.cpp" line="2884"/>
<source>&lt;p&gt;DriverVer: %1&lt;/p&gt;</source>
<translation>&lt;p&gt;VerSion: %1&lt;/p&gt;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2882"/>
<location filename="mainwindow.cpp" line="2885"/>
<source>&lt;p&gt;Vendor: %1&lt;/p&gt;</source>
<translation>&lt;p&gt;Vendor: %1&lt;/p&gt;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2883"/>
<location filename="mainwindow.cpp" line="2886"/>
<source>&lt;p&gt;Copyright: %1&lt;/p&gt;</source>
<translation>&lt;p&gt;Copyright: %1&lt;/p&gt;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2884"/>
<location filename="mainwindow.cpp" line="2887"/>
<source>&lt;p&gt;Company website: &lt;a href=%1&gt;%1&lt;/p&gt;</source>
<translation>&lt;p&gt;Company website: &lt;a href=%1&gt;%1&lt;/p&gt;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2885"/>
<location filename="mainwindow.cpp" line="2888"/>
<source>&lt;p&gt;Company address: %1&lt;/p&gt;</source>
<translation>&lt;p&gt;Company address: %1&lt;/p&gt;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2886"/>
<location filename="mainwindow.cpp" line="2889"/>
<source>&lt;p&gt;Company telephone: %1&lt;/p&gt;</source>
<translation>&lt;p&gt;Company telephone: %1&lt;/p&gt;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2887"/>
<location filename="mainwindow.cpp" line="2890"/>
<source>&lt;p&gt;Company GPS: &lt;a href=%1&gt;%2&lt;/p&gt;</source>
<translation>&lt;p&gt;Company GPS: &lt;a href=%1&gt;%2&lt;/p&gt;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2887"/>
<location filename="mainwindow.cpp" line="2890"/>
<source>Baidu map access</source>
<translation>Baidu map access</translation>
</message>
@ -2797,23 +2803,23 @@ Please contact the equipment supplier promptly to purchase a replacement paper r
<translation type="vanished">Total count: %1</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3170"/>
<location filename="mainwindow.cpp" line="3173"/>
<source>Detected that there is less than 1GB of disk space. Do you want to continue?</source>
<translation>Detected that there is less than 1GB of disk space. Do you want to continue?</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="389"/>
<location filename="mainwindow.cpp" line="3892"/>
<location filename="mainwindow.cpp" line="3895"/>
<source>Device %1 is open</source>
<translation>Device %1 is open</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2766"/>
<location filename="mainwindow.cpp" line="2769"/>
<source>confirm operation</source>
<translation>Confirm operation</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2767"/>
<location filename="mainwindow.cpp" line="2770"/>
<source>are you sure to clear the roller count?</source>
<translation>Are you sure you want to clear the roller count?</translation>
</message>
@ -2822,22 +2828,22 @@ Please contact the equipment supplier promptly to purchase a replacement paper r
<translation type="vanished">Prompt</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2778"/>
<location filename="mainwindow.cpp" line="2781"/>
<source>Roller scanned count has been set to 0.</source>
<translation>Roller count reset to zero.</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2782"/>
<location filename="mainwindow.cpp" line="2785"/>
<source>Roller scanned count reset failed.</source>
<translation>Failed to reset roller count.</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2858"/>
<location filename="mainwindow.cpp" line="2861"/>
<source>Error</source>
<translation>Error</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2858"/>
<location filename="mainwindow.cpp" line="2861"/>
<source>Document missing! It would be deleted or renamed.</source>
<translation>File lost! File may be deleted or renamed.</translation>
</message>
@ -2854,13 +2860,13 @@ Please contact the equipment supplier promptly to purchase a replacement paper r
<translation type="vanished">About</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3386"/>
<location filename="mainwindow.cpp" line="3389"/>
<source>cache path folder limit:%1</source>
<translation>Unable to access the current path:%1
Please try to log in to the administrator account in the [User] menu and go to the [Cache settings] to change the cache path.</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3390"/>
<location filename="mainwindow.cpp" line="3393"/>
<source>aquireinto folder limit:%1</source>
<translation>Unable to access the current path:%1
Please try to change the cache path in [Scan to].</translation>
@ -2874,7 +2880,7 @@ Please try to change the cache path in [Scan to].</translation>
<translation type="vanished">&lt;p&gt;%1&lt;/p&gt;&lt;p&gt;Version: %2&lt;br&gt;Copyright: &amp;#169; %3&lt;/p&gt;&lt;p&gt;%4%5%6%7%8%9&lt;/p&gt;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2879"/>
<location filename="mainwindow.cpp" line="2882"/>
<source>about %1</source>
<translation>About %1</translation>
</message>
@ -2919,13 +2925,13 @@ Please try to change the cache path in [Scan to].</translation>
<translation type="vanished">failed</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3355"/>
<location filename="mainwindow.cpp" line="3393"/>
<location filename="mainwindow.cpp" line="3358"/>
<location filename="mainwindow.cpp" line="3396"/>
<source>error</source>
<translation>Error</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3356"/>
<location filename="mainwindow.cpp" line="3359"/>
<source>start failed!</source>
<translation>Failed to start!</translation>
</message>
@ -2935,52 +2941,52 @@ Please try to change the cache path in [Scan to].</translation>
Please go to Scan to and change the accessible scan folder and then perform the scan.</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3470"/>
<location filename="mainwindow.cpp" line="3473"/>
<source>Insufficient access rights</source>
<translation>Insufficient file access permissions</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3474"/>
<location filename="mainwindow.cpp" line="3477"/>
<source>Image processing failed</source>
<translation>Image processing failed</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3478"/>
<location filename="mainwindow.cpp" line="3481"/>
<source>Ocr init failed</source>
<translation>OCR initialization error</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3482"/>
<location filename="mainwindow.cpp" line="3485"/>
<source>Ocr failed</source>
<translation>OCR failed</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3486"/>
<location filename="mainwindow.cpp" line="3489"/>
<source>File does not exist</source>
<translation>File does not exist</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3490"/>
<location filename="mainwindow.cpp" line="3493"/>
<source>Failed to load dynamic library</source>
<translation>Failed to load dynamic library</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3494"/>
<location filename="mainwindow.cpp" line="3497"/>
<source>File data error</source>
<translation>File data error</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3498"/>
<location filename="mainwindow.cpp" line="3501"/>
<source>Image format processing error</source>
<translation>Image format processing error</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3502"/>
<location filename="mainwindow.cpp" line="3505"/>
<source>Out of memory</source>
<translation>Insufficient memory</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3506"/>
<location filename="mainwindow.cpp" line="3509"/>
<source>Failed</source>
<translation>Failed</translation>
</message>
@ -3001,18 +3007,18 @@ Please go to “Scan to” and change the accessible scan folder and then perfor
<translation type="vanished">Close </translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3744"/>
<location filename="mainwindow.cpp" line="3747"/>
<source>tip</source>
<translation>Prompt</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3744"/>
<location filename="mainwindow.cpp" line="3747"/>
<source>Other versions not available</source>
<translation>No other versions obtained</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3764"/>
<location filename="mainwindow.cpp" line="3780"/>
<location filename="mainwindow.cpp" line="3767"/>
<location filename="mainwindow.cpp" line="3783"/>
<source>The device does not support this operation</source>
<translation>Device does not support this operation</translation>
</message>
@ -3021,13 +3027,13 @@ Please go to “Scan to” and change the accessible scan folder and then perfor
<translation type="vanished">IO error</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3802"/>
<location filename="mainwindow.cpp" line="3821"/>
<location filename="mainwindow.cpp" line="3805"/>
<location filename="mainwindow.cpp" line="3824"/>
<source>The language switch is successful and takes effect the next time the software is started!</source>
<translation>The language switch is successful and takes effect the next time the software is started!</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="3859"/>
<location filename="mainwindow.cpp" line="3862"/>
<source>Are you sure to delete selected file?</source>
<translation>Are you sure to delete the selected file completely?</translation>
</message>

View File

@ -134,7 +134,7 @@ Page range will be &quot;Chosen Pages&quot;.
<item>
<widget class="QCheckBox" name="check_saveAsMulti">
<property name="text">
<string>Save as multipages (TIFF/PDF/OFD/GIF)</string>
<string>Save as multipages (TIFF/PDF/OFD/GIF/RTF)</string>
</property>
</widget>
</item>

View File

@ -4,6 +4,7 @@
#include "base/HGInfo.h"
#include "base/HGUtility.h"
#include "imgfmt/HGImgFmt.h"
#include "imgfmt/HGGif.h"
#include "imgproc/HGOCR.h"
#include "HGUIGlobal.h"
#include "HGString.h"
@ -181,76 +182,84 @@ void HGAPI Dialog_ExportImageFile::ThreadFunc(HGThread thread, HGPointer param)
}
else
{
HGImgFmtWriter imgFmtWriter = nullptr;
ret = HGImgFmt_OpenImageWriter(getStdString(fileName).c_str(), 0, &imgFmtWriter);
if (HGBASE_ERR_OK == ret)
if (p->m_destExt == ".gif")
{
for (int i = 0; i < p->m_srcFiles.size(); ++i)
ret = p->processGif(fileName);
}
else
{
HGImgFmtWriter imgFmtWriter = nullptr;
ret = HGImgFmt_OpenImageWriter(getStdString(fileName).c_str(), 0, &imgFmtWriter);
if (HGBASE_ERR_OK == ret)
{
if (p->m_stopThread)
for (int i = 0; i < p->m_srcFiles.size(); ++i)
{
break;
}
emit p->updateProgress(i);
HGImgFmtReader imgFmtReader = nullptr;
ret = HGImgFmt_OpenImageReader(getStdString(p->m_srcFiles[i]).c_str(), 0, &imgFmtReader);
if (HGBASE_ERR_OK == ret)
{
HGUInt count = 0;
HGImgFmt_GetImagePageCount(imgFmtReader, &count);
for (HGUInt j = 0; j < count; ++j)
if (p->m_stopThread)
{
if (p->m_stopThread)
{
break;
}
HGImage img = nullptr;
ret = HGImgFmt_LoadImageFromReader(imgFmtReader, j, nullptr, 0, HGBASE_IMGORIGIN_TOP, &img);
if (HGBASE_ERR_OK == ret)
{
HGImgFmtSaveInfo saveInfo;
saveInfo.jpegQuality = (HGUInt)p->m_jpegQuality;
saveInfo.tiffCompression = HGIMGFMT_TIFFCOMP_NONE;
saveInfo.tiffJpegQuality = (HGUInt)p->m_tiffQuality;
HGImageInfo imgInfo;
HGBase_GetImageInfo(img, &imgInfo);
if (HGBASE_IMGTYPE_BINARY == imgInfo.type)
{
if (1 == p->m_tiffCompressionBW)
saveInfo.tiffCompression = HGIMGFMT_TIFFCOMP_LZW;
else if (2 == p->m_tiffCompressionBW)
saveInfo.tiffCompression = HGIMGFMT_TIFFCOMP_CCITTFAX4;
}
else
{
if (1 == p->m_tiffCompression)
saveInfo.tiffCompression = HGIMGFMT_TIFFCOMP_LZW;
else if (2 == p->m_tiffCompression)
saveInfo.tiffCompression = HGIMGFMT_TIFFCOMP_JPEG;
}
ret = HGImgFmt_SaveImageToWriter(imgFmtWriter, img, &saveInfo);
HGBase_DestroyImage(img);
}
if (ret != HGBASE_ERR_OK)
{
break;
}
break;
}
HGImgFmt_CloseImageReader(imgFmtReader);
emit p->updateProgress(i);
HGImgFmtReader imgFmtReader = nullptr;
ret = HGImgFmt_OpenImageReader(getStdString(p->m_srcFiles[i]).c_str(), 0, &imgFmtReader);
if (HGBASE_ERR_OK == ret)
{
HGUInt count = 0;
HGImgFmt_GetImagePageCount(imgFmtReader, &count);
for (HGUInt j = 0; j < count; ++j)
{
if (p->m_stopThread)
{
break;
}
HGImage img = nullptr;
ret = HGImgFmt_LoadImageFromReader(imgFmtReader, j, nullptr, 0, HGBASE_IMGORIGIN_TOP, &img);
if (HGBASE_ERR_OK == ret)
{
HGImgFmtSaveInfo saveInfo;
saveInfo.jpegQuality = (HGUInt)p->m_jpegQuality;
saveInfo.tiffCompression = HGIMGFMT_TIFFCOMP_NONE;
saveInfo.tiffJpegQuality = (HGUInt)p->m_tiffQuality;
HGImageInfo imgInfo;
HGBase_GetImageInfo(img, &imgInfo);
if (HGBASE_IMGTYPE_BINARY == imgInfo.type)
{
if (1 == p->m_tiffCompressionBW)
saveInfo.tiffCompression = HGIMGFMT_TIFFCOMP_LZW;
else if (2 == p->m_tiffCompressionBW)
saveInfo.tiffCompression = HGIMGFMT_TIFFCOMP_CCITTFAX4;
}
else
{
if (1 == p->m_tiffCompression)
saveInfo.tiffCompression = HGIMGFMT_TIFFCOMP_LZW;
else if (2 == p->m_tiffCompression)
saveInfo.tiffCompression = HGIMGFMT_TIFFCOMP_JPEG;
}
ret = HGImgFmt_SaveImageToWriter(imgFmtWriter, img, &saveInfo);
HGBase_DestroyImage(img);
}
if (ret != HGBASE_ERR_OK)
{
break;
}
}
HGImgFmt_CloseImageReader(imgFmtReader);
}
if (ret != HGBASE_ERR_OK)
break;
}
if (ret != HGBASE_ERR_OK)
break;
HGImgFmt_CloseImageWriter(imgFmtWriter);
}
HGImgFmt_CloseImageWriter(imgFmtWriter);
}
}
}
@ -356,6 +365,87 @@ void Dialog_ExportImageFile::on_pushButton_clicked()
m_thread = nullptr;
}
HGResult Dialog_ExportImageFile::processGif(const QString &fileName)
{
HGUInt maxWidth = 0;
HGUInt maxHeight = 0;
for (int i = 0; i < m_srcFiles.size(); ++i)
{
HGImgFmtReader imgFmtReader = nullptr;
HGImgFmt_OpenImageReader(getStdString(m_srcFiles[i]).c_str(), 0, &imgFmtReader);
if (nullptr != imgFmtReader)
{
HGUInt count = 0;
HGImgFmt_GetImagePageCount(imgFmtReader, &count);
for (HGUInt j = 0; j < count; ++j)
{
HGImgFmtLoadInfo info = {0};
HGImgFmt_LoadImageFromReader(imgFmtReader, j, &info, 0, 0, NULL);
if (info.width > maxWidth)
maxWidth = info.width;
if (info.height > maxHeight)
maxHeight = info.height;
}
HGImgFmt_CloseImageReader(imgFmtReader);
}
}
HGGifSaveInfo gifSaveInfo = {maxWidth, maxHeight};
HGGifWriter gifWriter = NULL;
HGResult ret = HGImgFmt_OpenGifWriter(getStdString(fileName).c_str(), &gifSaveInfo, &gifWriter);
if (ret != HGBASE_ERR_OK)
return ret;
for (int i = 0; i < m_srcFiles.size(); ++i)
{
if (m_stopThread)
{
break;
}
emit updateProgress(i);
HGImgFmtReader imgFmtReader = nullptr;
ret = HGImgFmt_OpenImageReader(getStdString(m_srcFiles[i]).c_str(), 0, &imgFmtReader);
if (HGBASE_ERR_OK == ret)
{
HGUInt count = 0;
HGImgFmt_GetImagePageCount(imgFmtReader, &count);
for (HGUInt j = 0; j < count; ++j)
{
if (m_stopThread)
{
break;
}
HGImage img = nullptr;
ret = HGImgFmt_LoadImageFromReader(imgFmtReader, j, nullptr, 0, HGBASE_IMGORIGIN_TOP, &img);
if (HGBASE_ERR_OK == ret)
{
ret = HGImgFmt_SaveImageToGifWriter(gifWriter, 200, HG_MAKECOLOR(255, 255, 255, 255), img);
HGBase_DestroyImage(img);
}
if (ret != HGBASE_ERR_OK)
{
break;
}
}
HGImgFmt_CloseImageReader(imgFmtReader);
}
if (ret != HGBASE_ERR_OK)
break;
}
HGImgFmt_CloseGifWriter(gifWriter);
return ret;
}
void Dialog_ExportImageFile::closeEvent(QCloseEvent *e)
{
(void)e;

View File

@ -30,6 +30,9 @@ private slots:
void on_pushButton_clicked();
private:
HGResult processGif(const QString &fileName);
protected:
virtual void closeEvent(QCloseEvent *e);

View File

@ -67,6 +67,9 @@ Dialog_SaveAs::Dialog_SaveAs(bool isSaveAs, QWidget *parent) :
ui->setupUi(this);
setWindowFlags(Qt::Dialog | Qt::WindowCloseButtonHint);
if (!m_isSaveAs)
setWindowTitle(tr("Save"));
ui->fileDialog->setAcceptMode(QFileDialog::AcceptSave);
ui->fileDialog->setWindowFlags(ui->fileDialog->windowFlags() & ~Qt::Dialog);
ui->fileDialog->setOption(QFileDialog::DontUseNativeDialog, true);

View File

@ -1953,8 +1953,12 @@ void MainWindow::on_act_save_triggered()
if (0 == m_currFilePath.indexOf(Dialog_ClrCache::getCachePath()))
{
QString savePath;
bool isOcr =false;
if (!auto_save_changes_)
{
savePath = auto_save_info_.path;
isOcr = auto_save_info_.isOcr;
}
else
savePath = m_currFilePath;
@ -1962,7 +1966,6 @@ void MainWindow::on_act_save_triggered()
int tiffCompressionBW = auto_save_info_.tiffCompressionBW;
int tiffCompression = auto_save_info_.tiffCompression;
int tiffQuality = auto_save_info_.tiffQuality;
bool isOcr = auto_save_info_.isOcr;
bool find = false;
int count = 0;
@ -1989,9 +1992,9 @@ void MainWindow::on_act_save_triggered()
if (!auto_save_changes_)
{
savePath = auto_save_info_.path = dlg.getSavePath();
isOcr = auto_save_info_.isOcr = dlg.isOcr();
}
isOcr = auto_save_info_.isOcr = dlg.isOcr();
jpegQuality = auto_save_info_.jpegQuality = dlg.getJpegQuality();
tiffQuality = auto_save_info_.tiffQuality = dlg.getTiffQuality();
tiffCompression = auto_save_info_.tiffCompression = dlg.getTiffCompression();