mirror of
https://github.com/Tichau/FileConverter.git
synced 2026-11-28 17:31:56 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b211b4aea0 | ||
|
|
93b38182d5 | ||
|
|
82728aefba | ||
|
|
3d6315ce58 | ||
|
|
ef02cde9b9 | ||
|
|
ead28a613d | ||
|
|
4ee60445f0 | ||
|
|
409d726d35 | ||
|
|
cbaf6ca437 | ||
|
|
8494cb5f1e | ||
|
|
4a058052d4 | ||
|
|
1de3c3e0af | ||
|
|
141d113c07 | ||
|
|
e2016f6ac2 | ||
|
|
1b7db8e9b4 | ||
|
|
df5db67aa4 | ||
|
|
d34d3cb4ce | ||
|
|
292c9b3414 | ||
|
|
c86d1b75ce | ||
|
|
edef60c66a | ||
|
|
9204b7fb3c |
No files matched your search
@@ -32,7 +32,7 @@ namespace FileConverter
|
|||||||
{
|
{
|
||||||
Major = 1,
|
Major = 1,
|
||||||
Minor = 2,
|
Minor = 2,
|
||||||
Patch = 2,
|
Patch = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
private readonly List<ConversionJob> conversionJobs = new List<ConversionJob>();
|
private readonly List<ConversionJob> conversionJobs = new List<ConversionJob>();
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ namespace FileConverter.ConversionJobs
|
|||||||
public class ConversionJob_ImageMagick : ConversionJob
|
public class ConversionJob_ImageMagick : ConversionJob
|
||||||
{
|
{
|
||||||
private const float BaseDpiForPdfConversion = 200f;
|
private const float BaseDpiForPdfConversion = 200f;
|
||||||
|
private const int PdfSuperSamplingRatio = 1;
|
||||||
|
|
||||||
private bool isInputFilePdf;
|
private bool isInputFilePdf;
|
||||||
private int pageCount;
|
private int pageCount;
|
||||||
@@ -95,7 +96,7 @@ namespace FileConverter.ConversionJobs
|
|||||||
}
|
}
|
||||||
|
|
||||||
Debug.Log("Density: {0}dpi.", dpi);
|
Debug.Log("Density: {0}dpi.", dpi);
|
||||||
settings.Density = new Density(dpi);
|
settings.Density = new Density(dpi * PdfSuperSamplingRatio);
|
||||||
|
|
||||||
this.UserState = Properties.Resources.ConversionStateReadDocument;
|
this.UserState = Properties.Resources.ConversionStateReadDocument;
|
||||||
|
|
||||||
@@ -112,8 +113,14 @@ namespace FileConverter.ConversionJobs
|
|||||||
foreach (MagickImage image in images)
|
foreach (MagickImage image in images)
|
||||||
{
|
{
|
||||||
Debug.Log("Write page {0}/{1}.", this.CurrentOuputFilePathIndex + 1, this.pageCount);
|
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++;
|
this.CurrentOuputFilePathIndex++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -181,7 +188,8 @@ namespace FileConverter.ConversionJobs
|
|||||||
switch (this.ConversionPreset.OutputType)
|
switch (this.ConversionPreset.OutputType)
|
||||||
{
|
{
|
||||||
case OutputType.Png:
|
case OutputType.Png:
|
||||||
image.Quality = 100;
|
// http://stackoverflow.com/questions/27267073/imagemagick-lossless-max-compression-for-png
|
||||||
|
image.Quality = 95;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OutputType.Jpg:
|
case OutputType.Jpg:
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ namespace FileConverter
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Xml.Serialization;
|
using System.Xml.Serialization;
|
||||||
@@ -378,7 +379,7 @@ namespace FileConverter
|
|||||||
return (T)System.Enum.Parse(type, settingsValue);
|
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)
|
public bool IsRelevantSetting(string settingsKey)
|
||||||
|
|||||||
@@ -67,22 +67,26 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Magick.NET-Q16-AnyCPU, Version=7.0.0.0, Culture=neutral, PublicKeyToken=2004825badfa91ec, processorArchitecture=MSIL">
|
<Reference Include="Magick.NET-Q16-AnyCPU, Version=7.0.0.0, Culture=neutral, PublicKeyToken=2004825badfa91ec, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Magick.NET-Q16-AnyCPU.7.0.2.900\lib\net40-client\Magick.NET-Q16-AnyCPU.dll</HintPath>
|
<HintPath>..\..\packages\Magick.NET-Q16-AnyCPU.7.0.5.502\lib\net40-client\Magick.NET-Q16-AnyCPU.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Markdown.Xaml">
|
<Reference Include="Markdown.Xaml">
|
||||||
<HintPath>..\..\Middleware\Markdown.Xaml.dll</HintPath>
|
<HintPath>..\..\Middleware\Markdown.Xaml.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Office.Interop.Excel, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.Office.Interop.Excel.15.0.4795.1000\lib\net20\Microsoft.Office.Interop.Excel.dll</HintPath>
|
||||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Office.Interop.PowerPoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Office.Interop.PowerPoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
|
||||||
|
<HintPath>..\..\packages\Microsoft.Office.Interop.PowerPoint.12.0.4518.1014\lib\net20\Microsoft.Office.Interop.PowerPoint.dll</HintPath>
|
||||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Office.Interop.Word, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Office.Interop.Word, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\packages\Microsoft.Office.Interop.Word.15.0.4797.1003\lib\net20\Microsoft.Office.Interop.Word.dll</HintPath>
|
||||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="office, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
|
<Reference Include="Office, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
|
||||||
|
<HintPath>..\..\packages\Office.12.0.0\lib\net40\Office.dll</HintPath>
|
||||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="PresentationUI, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
|
<Reference Include="PresentationUI, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
|
||||||
@@ -270,7 +274,9 @@
|
|||||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<None Include="packages.config" />
|
<None Include="packages.config">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</None>
|
||||||
<None Include="Properties\Settings.settings">
|
<None Include="Properties\Settings.settings">
|
||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="Magick.NET-Q16-AnyCPU" version="7.0.2.900" targetFramework="net45" />
|
<package id="Magick.NET-Q16-AnyCPU" version="7.0.5.502" targetFramework="net45" />
|
||||||
|
<package id="Microsoft.Office.Interop.Excel" version="15.0.4795.1000" targetFramework="net45" />
|
||||||
|
<package id="Microsoft.Office.Interop.PowerPoint" version="12.0.4518.1014" targetFramework="net45" />
|
||||||
|
<package id="Microsoft.Office.Interop.Word" version="15.0.4797.1003" targetFramework="net45" />
|
||||||
|
<package id="Office" version="12.0.0" targetFramework="net45" />
|
||||||
<package id="WpfAnimatedGif" version="1.4.14" targetFramework="net45" />
|
<package id="WpfAnimatedGif" version="1.4.14" targetFramework="net45" />
|
||||||
</packages>
|
</packages>
|
||||||
@@ -1,5 +1,11 @@
|
|||||||
# Change Log
|
# 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
|
## Version 1.2.2
|
||||||
- Added: 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 scale was corrupted when switching application language (github issue #5).
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
<!-- Upgrade documentation: http://wixtoolset.org/documentation/manual/v3/howtos/updates/major_upgrade.html -->
|
<!-- Upgrade documentation: http://wixtoolset.org/documentation/manual/v3/howtos/updates/major_upgrade.html -->
|
||||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||||
<Product Id="*" Name="$(var.ProductName)" Language="1033" Version="1.2.2" Manufacturer="Adrien Allard" UpgradeCode="e3ca717b-a897-418a-bbef-5c7e35c76e4b">
|
<Product Id="*" Name="$(var.ProductName)" Language="1033" Version="1.2.3" Manufacturer="Adrien Allard" UpgradeCode="e3ca717b-a897-418a-bbef-5c7e35c76e4b">
|
||||||
<?if $(var.Platform) = x64 ?>
|
<?if $(var.Platform) = x64 ?>
|
||||||
<Package Id="*" InstallerVersion="200" Compressed="yes" InstallScope="perMachine" Platform="x64" />
|
<Package Id="*" InstallerVersion="200" Compressed="yes" InstallScope="perMachine" Platform="x64" />
|
||||||
<?else ?>
|
<?else ?>
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
<Version>
|
<Version>
|
||||||
<Latest Major="1" Minor="2" Patch="1"/>
|
<Latest Major="1" Minor="2" Patch="2"/>
|
||||||
<URL>https://github.com/Tichau/FileConverter/releases/download/v1.2.1/FileConverter-1.2.1-x86-setup.msi</URL>
|
<URL>https://github.com/Tichau/FileConverter/releases/download/v1.2.2/FileConverter-1.2.2-x86-setup.msi</URL>
|
||||||
</Version>
|
</Version>
|
||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
<Version>
|
<Version>
|
||||||
<Latest Major="1" Minor="2" Patch="1"/>
|
<Latest Major="1" Minor="2" Patch="2"/>
|
||||||
<URL>https://github.com/Tichau/FileConverter/releases/download/v1.2.1/FileConverter-1.2.1-x64-setup.msi</URL>
|
<URL>https://github.com/Tichau/FileConverter/releases/download/v1.2.2/FileConverter-1.2.2-x64-setup.msi</URL>
|
||||||
</Version>
|
</Version>
|
||||||
Reference in new issue
Block a user