diff --git a/Application/FileConverter/Application.xaml.cs b/Application/FileConverter/Application.xaml.cs index adc571d..b2c4b6b 100644 --- a/Application/FileConverter/Application.xaml.cs +++ b/Application/FileConverter/Application.xaml.cs @@ -32,7 +32,7 @@ namespace FileConverter { Major = 1, Minor = 2, - Patch = 2, + Patch = 3, }; private readonly List conversionJobs = new List(); diff --git a/Application/FileConverter/ConversionJobs/ConversionJob_ImageMagick.cs b/Application/FileConverter/ConversionJobs/ConversionJob_ImageMagick.cs index b4f064c..c3a100f 100644 --- a/Application/FileConverter/ConversionJobs/ConversionJob_ImageMagick.cs +++ b/Application/FileConverter/ConversionJobs/ConversionJob_ImageMagick.cs @@ -10,6 +10,7 @@ namespace FileConverter.ConversionJobs public class ConversionJob_ImageMagick : ConversionJob { private const float BaseDpiForPdfConversion = 200f; + private const int PdfSuperSamplingRatio = 1; private bool isInputFilePdf; private int pageCount; @@ -95,7 +96,7 @@ namespace FileConverter.ConversionJobs } Debug.Log("Density: {0}dpi.", dpi); - settings.Density = new Density(dpi); + settings.Density = new Density(dpi * PdfSuperSamplingRatio); this.UserState = Properties.Resources.ConversionStateReadDocument; @@ -112,8 +113,14 @@ namespace FileConverter.ConversionJobs foreach (MagickImage image in images) { Debug.Log("Write page {0}/{1}.", this.CurrentOuputFilePathIndex + 1, this.pageCount); - this.ConvertImage(image, true); + if (PdfSuperSamplingRatio > 1) + { + image.Scale(new Percentage(100 / PdfSuperSamplingRatio)); + } + + this.ConvertImage(image, true); + this.CurrentOuputFilePathIndex++; } } @@ -181,7 +188,8 @@ namespace FileConverter.ConversionJobs switch (this.ConversionPreset.OutputType) { case OutputType.Png: - image.Quality = 100; + // http://stackoverflow.com/questions/27267073/imagemagick-lossless-max-compression-for-png + image.Quality = 95; break; case OutputType.Jpg: diff --git a/Application/FileConverter/ConversionPreset/ConversionPreset.cs b/Application/FileConverter/ConversionPreset/ConversionPreset.cs index bd550bf..2ec5a9f 100644 --- a/Application/FileConverter/ConversionPreset/ConversionPreset.cs +++ b/Application/FileConverter/ConversionPreset/ConversionPreset.cs @@ -5,6 +5,7 @@ namespace FileConverter using System; using System.Collections.Generic; using System.ComponentModel; + using System.Globalization; using System.Linq; using System.Runtime.CompilerServices; using System.Xml.Serialization; @@ -378,7 +379,7 @@ namespace FileConverter return (T)System.Enum.Parse(type, settingsValue); } - return (T)System.Convert.ChangeType(settingsValue, type); + return (T)System.Convert.ChangeType(settingsValue, type, NumberFormatInfo.InvariantInfo); } public bool IsRelevantSetting(string settingsKey) diff --git a/Application/FileConverter/FileConverter.csproj b/Application/FileConverter/FileConverter.csproj index a3c5d03..58f2e0c 100644 --- a/Application/FileConverter/FileConverter.csproj +++ b/Application/FileConverter/FileConverter.csproj @@ -67,22 +67,26 @@ - ..\..\packages\Magick.NET-Q16-AnyCPU.7.0.2.900\lib\net40-client\Magick.NET-Q16-AnyCPU.dll + ..\..\packages\Magick.NET-Q16-AnyCPU.7.0.5.502\lib\net40-client\Magick.NET-Q16-AnyCPU.dll True ..\..\Middleware\Markdown.Xaml.dll - + + ..\..\packages\Microsoft.Office.Interop.Excel.15.0.4795.1000\lib\net20\Microsoft.Office.Interop.Excel.dll True - + + ..\..\packages\Microsoft.Office.Interop.PowerPoint.12.0.4518.1014\lib\net20\Microsoft.Office.Interop.PowerPoint.dll True - + + ..\..\packages\Microsoft.Office.Interop.Word.15.0.4797.1003\lib\net20\Microsoft.Office.Interop.Word.dll True - + + ..\..\packages\Office.12.0.0\lib\net40\Office.dll True @@ -270,7 +274,9 @@ Resources.Designer.cs Designer - + + Designer + SettingsSingleFileGenerator Settings.Designer.cs diff --git a/Application/FileConverter/packages.config b/Application/FileConverter/packages.config index 09cd3f9..4f43ae1 100644 --- a/Application/FileConverter/packages.config +++ b/Application/FileConverter/packages.config @@ -1,5 +1,9 @@  - + + + + + \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index b9aefc5..06bfe41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,13 @@ # Change Log +## Version 1.2.3 +- Fixed: Issue where the scale were not working for image conversions depending on the application current language. +- Tech: Include office librairy dependencies in package config (now you don't need to install office to build the project). +- Tech: Upgrade ghostscript to version 9.21. +- Tech: Update ImageMagick to version 7.0.5. + ## Version 1.2.2 -- New: Portuguese translation (thanks to Khidreal). +- Added: Portuguese translation (thanks to Khidreal). - Fixed: Issue where scale was corrupted when switching application language (github issue #5). - Fixed: Issue where file metadata were not copied when converting to aac format (github issue #15). - Tech: Update to ffmpeg 3.2.2 version. diff --git a/Installer/Product.wxs b/Installer/Product.wxs index 190bed4..3105a09 100644 --- a/Installer/Product.wxs +++ b/Installer/Product.wxs @@ -12,7 +12,7 @@ - + diff --git a/Middleware/gs/x86/gsdll32.dll b/Middleware/gs/x86/gsdll32.dll index 486ebc0..4618936 100644 Binary files a/Middleware/gs/x86/gsdll32.dll and b/Middleware/gs/x86/gsdll32.dll differ diff --git a/Middleware/gs/x86/gswin32c.exe b/Middleware/gs/x86/gswin32c.exe index 7f0b08d..1939247 100644 Binary files a/Middleware/gs/x86/gswin32c.exe and b/Middleware/gs/x86/gswin32c.exe differ