Skip to content

Commit

Permalink
Disable Leanify in PNG and ICO when Copy Metadata is checked (ZonaCasio)
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.code.sf.net/p/nikkhokkho/code/trunk@610 ddd8a7e7-04a1-4c0d-ae79-48073a28b335
  • Loading branch information
nikkho committed Oct 30, 2016
1 parent ecae525 commit d30d69e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions FileOptimizer/Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ ndo
X.XX - YYYY/MM/DD
- Installer now supports the /AllUsers argument to install for all users instead of current user (Grahame Bevan).
- 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).
- Added 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).
- Disabled Leanify from the JPEG, PNG and ICO toolchains 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.
Expand Down
12 changes: 10 additions & 2 deletions FileOptimizer/Source/cppMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1179,7 +1179,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.bPNGCopyMetadata)
{
RunPlugin((unsigned int) iCount, "Leanify", (sPluginsDirectory + "leanify.exe -q " + sFlags + "\"%TMPINPUTFILE%\"").c_str(), sPluginsDirectory, sInputFile, "", 0, 0);
}
}
}
// JPEG: jpeg-recompress, jhead, Leanify, ect, jpegoptim, jpegtran, mozjpegtran
Expand Down Expand Up @@ -1537,7 +1541,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.bPNGCopyMetadata)
{
RunPlugin((unsigned int) iCount, "Leanify", (sPluginsDirectory + "leanify.exe -q " + sFlags + "\"%TMPINPUTFILE%\"").c_str(), sPluginsDirectory, sInputFile, "", 0, 0);
}

sFlags = "";
//iLevel = min(gudtOptions.iLevel * 7 / 9, 7) + 1;
Expand Down

1 comment on commit d30d69e

@TPS
Copy link

@TPS TPS commented on d30d69e Nov 9, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix requested in JayXon/Leanify#26

Please sign in to comment.