From f4d24b8b3c1db54053f5317b3ceb29052472cc26 Mon Sep 17 00:00:00 2001 From: nikkho Date: Sun, 30 Oct 2016 15:45:56 +0000 Subject: [PATCH] Disabled Leanify from the JPEG toolchain when copy metadata is enabled, because it removed IPTC information (ZonaCasio). git-svn-id: svn://svn.code.sf.net/p/nikkhokkho/code/trunk@608 ddd8a7e7-04a1-4c0d-ae79-48073a28b335 --- FileOptimizer/Changelog.txt | 1 + FileOptimizer/Source/cppMain.cpp | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/FileOptimizer/Changelog.txt b/FileOptimizer/Changelog.txt index d8e85f5..33bd1fd 100644 --- a/FileOptimizer/Changelog.txt +++ b/FileOptimizer/Changelog.txt @@ -177,6 +177,7 @@ X.XX - YYYY/MM/DD - Fixed remove selected files (Shift-Del) always enabled since 9.00 when unified ribbon and regular UI (TPS). - Add original and optimized sizes in log file (JoeW). - Fixed a bug in mutool that prevented execution on PDF (LeTiger). +- Disabled Leanify from the JPEG toolchain when copy metadata is enabled, because it removed IPTC information (ZonaCasio). - Updated to ECT 0.6.2.0 -511fa96- x86 and x64 optimized builds (thanks Malloc Voidstar). - Updated jsmin custom build with Visual C++ 2015. - Updated Leanify to 0.4.3.159 daily binaries. diff --git a/FileOptimizer/Source/cppMain.cpp b/FileOptimizer/Source/cppMain.cpp index 8e4c3b9..cd1e4d3 100644 --- a/FileOptimizer/Source/cppMain.cpp +++ b/FileOptimizer/Source/cppMain.cpp @@ -1226,7 +1226,11 @@ void __fastcall TfrmMain::actOptimizeFor(TObject *Sender, int iCount) iLevel = ((gudtOptions.iLevel * gudtOptions.iLevel * gudtOptions.iLevel) / 25) + 1; //1, 1, 2, 3, 6, 9, 14, 21, 30 } sFlags += "-i " + (String) iLevel + " "; - RunPlugin((unsigned int) iCount, "Leanify", (sPluginsDirectory + "leanify.exe -q " + sFlags + "\"%TMPINPUTFILE%\"").c_str(), sPluginsDirectory, sInputFile, "", 0, 0); + //Temporary disable Leanify because it removed IPTC metadata + if (!gudtOptions.bJPEGCopyMetadata) + { + RunPlugin((unsigned int) iCount, "Leanify", (sPluginsDirectory + "leanify.exe -q " + sFlags + "\"%TMPINPUTFILE%\"").c_str(), sPluginsDirectory, sInputFile, "", 0, 0); + } //Seems to cause some loss of quality //iError = RunPlugin((unsigned int) iCount, "ImageMagick", (sPluginsDirectory + "magick.exe convert -quiet -interlace Plane -define jpeg:optimize-coding=true " +sFlags +"\"" + sShortFile + "\" \"" + acTmpFile + "\"").c_str(), sPluginsDirectory, acTmpFile);