From ea22f9fb65a17dd3052e99b841bbb4d77492490f Mon Sep 17 00:00:00 2001 From: RTnhN <43109787+RTnhN@users.noreply.github.com> Date: Sun, 24 Nov 2024 00:12:02 -0600 Subject: [PATCH 1/3] Implement gif to img conversion --- .../FileConverter/ConversionJobs/ConversionJobFactory.cs | 5 +++-- .../ConversionJobs/ConversionJob_ImageMagick.cs | 6 ++++++ Application/FileConverter/Helpers.cs | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Application/FileConverter/ConversionJobs/ConversionJobFactory.cs b/Application/FileConverter/ConversionJobs/ConversionJobFactory.cs index 9791a66..7b20167 100644 --- a/Application/FileConverter/ConversionJobs/ConversionJobFactory.cs +++ b/Application/FileConverter/ConversionJobs/ConversionJobFactory.cs @@ -43,8 +43,9 @@ namespace FileConverter.ConversionJobs return new ConversionJob_ImageMagick(conversionPreset, inputFilePath); } - if (Helpers.GetExtensionCategory(inputFileExtension) == Helpers.InputCategoryNames.Image || - Helpers.GetExtensionCategory(inputFileExtension) == Helpers.InputCategoryNames.Document) + if (conversionPreset.OutputType == OutputType.Jpg || + conversionPreset.OutputType == OutputType.Png || + conversionPreset.OutputType == OutputType.Webp) { return new ConversionJob_ImageMagick(conversionPreset, inputFilePath); } diff --git a/Application/FileConverter/ConversionJobs/ConversionJob_ImageMagick.cs b/Application/FileConverter/ConversionJobs/ConversionJob_ImageMagick.cs index 1c95dff..725ba8d 100644 --- a/Application/FileConverter/ConversionJobs/ConversionJob_ImageMagick.cs +++ b/Application/FileConverter/ConversionJobs/ConversionJob_ImageMagick.cs @@ -86,6 +86,12 @@ namespace FileConverter.ConversionJobs readSettings.Format = MagickFormat.Dng; break; + case ".gif": + // Get the first frame of the gif for conversion. + // Maybe in the future make this user selectable. + readSettings.FrameIndex = 0; + break; + default: break; } diff --git a/Application/FileConverter/Helpers.cs b/Application/FileConverter/Helpers.cs index c86ca27..35c8fcb 100644 --- a/Application/FileConverter/Helpers.cs +++ b/Application/FileConverter/Helpers.cs @@ -216,7 +216,7 @@ namespace FileConverter case OutputType.Jpg: case OutputType.Png: case OutputType.Webp: - return category == InputCategoryNames.Image || category == InputCategoryNames.Document; + return category == InputCategoryNames.Image || category == InputCategoryNames.Document || category == InputCategoryNames.AnimatedImage; case OutputType.Gif: return category == InputCategoryNames.Image || category == InputCategoryNames.Video || category == InputCategoryNames.AnimatedImage; From da82ee8500b485ab738927394bb181789b1591df Mon Sep 17 00:00:00 2001 From: Zach Strout <43109787+RTnhN@users.noreply.github.com> Date: Sun, 24 Nov 2024 00:20:33 -0600 Subject: [PATCH 2/3] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 89cd5b3..0a5c548 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - New: Persian translation (thanks to MrHero118). - Fixes: Hebrew translation issues (thanks to AshiVered). +- New: Add Gif to Image conversion support (issue #433, #115) ## Version 2.0.2 From cff6b1470264b756630c4819b863700058fc3e1b Mon Sep 17 00:00:00 2001 From: RTnhN <43109787+RTnhN@users.noreply.github.com> Date: Tue, 10 Dec 2024 17:49:49 -0600 Subject: [PATCH 3/3] Update ImageMagick to 14.2 Heic images from IOS 18 cause problems for earlier versions of ImageMagick.net. https://github.com/dlemstra/Magick.NET/issues/1753 This updates the library to 14.2.0. The library changed a bunch of int to uint, so this also casts all of the ints to uints. --- Application/FileConverter/App.config | 58 +- .../ConversionJob_ImageMagick.cs | 496 +++++----- .../FileConverter/FileConverter.csproj | 920 +++++++++--------- Application/FileConverter/packages.config | 42 +- CHANGELOG.md | 1 + README.md | 2 +- 6 files changed, 761 insertions(+), 758 deletions(-) diff --git a/Application/FileConverter/App.config b/Application/FileConverter/App.config index 4165a81..16b1c44 100644 --- a/Application/FileConverter/App.config +++ b/Application/FileConverter/App.config @@ -1,27 +1,31 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Application/FileConverter/ConversionJobs/ConversionJob_ImageMagick.cs b/Application/FileConverter/ConversionJobs/ConversionJob_ImageMagick.cs index 725ba8d..794d473 100644 --- a/Application/FileConverter/ConversionJobs/ConversionJob_ImageMagick.cs +++ b/Application/FileConverter/ConversionJobs/ConversionJob_ImageMagick.cs @@ -1,254 +1,254 @@ -// License: http://www.gnu.org/licenses/gpl.html GPL version 3. - -namespace FileConverter.ConversionJobs -{ - using System; - - using FileConverter.Diagnostics; - using ImageMagick; - - public class ConversionJob_ImageMagick : ConversionJob - { - private const float BaseDpiForPdfConversion = 200f; - private const int PdfSuperSamplingRatio = 1; - - private bool isInputFilePdf; - private int pageCount; - - public ConversionJob_ImageMagick() : base() - { - } - - public ConversionJob_ImageMagick(ConversionPreset conversionPreset, string inputFilePath) : base(conversionPreset, inputFilePath) - { - } - - protected override void Initialize() - { - base.Initialize(); - - string applicationDirectory = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location); - MagickNET.SetGhostscriptDirectory(applicationDirectory); - - this.isInputFilePdf = System.IO.Path.GetExtension(this.InputFilePath).ToLowerInvariant() == ".pdf"; - - if (this.ConversionPreset == null) - { - throw new Exception("The conversion preset must be valid."); - } - } - - protected override int GetOutputFilesCount() - { - if (System.IO.Path.GetExtension(this.InputFilePath).ToLowerInvariant() == ".pdf") - { - using (MagickImageCollection images = new MagickImageCollection()) - { - MagickReadSettings settings = new MagickReadSettings(); - settings.Density = new Density(1, 1); - images.Read(this.InputFilePath); - - return images.Count; - } - } - - return 1; - } - - protected override void Convert() - { - if (this.ConversionPreset == null) - { - throw new Exception("The conversion preset must be valid."); - } - - this.CurrentOutputFilePathIndex = 0; - - if (this.isInputFilePdf) - { - this.ConvertPdf(); - } - else - { - this.pageCount = 1; - MagickReadSettings readSettings = new MagickReadSettings(); - - string inputExtension = System.IO.Path.GetExtension(this.InputFilePath).ToLowerInvariant(); - switch (inputExtension) - { - case ".cr2": - // Requires an explicit image format otherwise the image is interpreted as a TIFF image. - readSettings.Format = MagickFormat.Cr2; - break; - - case ".dng": - // Requires an explicit image format otherwise the image is interpreted as a TIFF image. - readSettings.Format = MagickFormat.Dng; - break; - +// License: http://www.gnu.org/licenses/gpl.html GPL version 3. + +namespace FileConverter.ConversionJobs +{ + using System; + + using FileConverter.Diagnostics; + using ImageMagick; + + public class ConversionJob_ImageMagick : ConversionJob + { + private const float BaseDpiForPdfConversion = 200f; + private const int PdfSuperSamplingRatio = 1; + + private bool isInputFilePdf; + private int pageCount; + + public ConversionJob_ImageMagick() : base() + { + } + + public ConversionJob_ImageMagick(ConversionPreset conversionPreset, string inputFilePath) : base(conversionPreset, inputFilePath) + { + } + + protected override void Initialize() + { + base.Initialize(); + + string applicationDirectory = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location); + MagickNET.SetGhostscriptDirectory(applicationDirectory); + + this.isInputFilePdf = System.IO.Path.GetExtension(this.InputFilePath).ToLowerInvariant() == ".pdf"; + + if (this.ConversionPreset == null) + { + throw new Exception("The conversion preset must be valid."); + } + } + + protected override int GetOutputFilesCount() + { + if (System.IO.Path.GetExtension(this.InputFilePath).ToLowerInvariant() == ".pdf") + { + using (MagickImageCollection images = new MagickImageCollection()) + { + MagickReadSettings settings = new MagickReadSettings(); + settings.Density = new Density(1, 1); + images.Read(this.InputFilePath); + + return images.Count; + } + } + + return 1; + } + + protected override void Convert() + { + if (this.ConversionPreset == null) + { + throw new Exception("The conversion preset must be valid."); + } + + this.CurrentOutputFilePathIndex = 0; + + if (this.isInputFilePdf) + { + this.ConvertPdf(); + } + else + { + this.pageCount = 1; + MagickReadSettings readSettings = new MagickReadSettings(); + + string inputExtension = System.IO.Path.GetExtension(this.InputFilePath).ToLowerInvariant(); + switch (inputExtension) + { + case ".cr2": + // Requires an explicit image format otherwise the image is interpreted as a TIFF image. + readSettings.Format = MagickFormat.Cr2; + break; + + case ".dng": + // Requires an explicit image format otherwise the image is interpreted as a TIFF image. + readSettings.Format = MagickFormat.Dng; + break; + case ".gif": // Get the first frame of the gif for conversion. // Maybe in the future make this user selectable. readSettings.FrameIndex = 0; break; - default: - break; - } - - using (MagickImage image = new MagickImage(this.InputFilePath, readSettings)) - { - Debug.Log($"Load image {this.InputFilePath} succeed."); - this.ConvertImage(image); - } - } - } - - private void ConvertPdf() - { - MagickReadSettings settings = new MagickReadSettings(); - - float dpi = BaseDpiForPdfConversion; - float scaleFactor = this.ConversionPreset.GetSettingsValue(ConversionPreset.ConversionSettingKeys.ImageScale); - if (Math.Abs(scaleFactor - 1f) >= 0.005f) - { - Debug.Log($"Apply scale factor: {scaleFactor * 100}%."); - - dpi *= scaleFactor; - } - - Debug.Log($"Density: {dpi}dpi."); - settings.Density = new Density(dpi * PdfSuperSamplingRatio); - - this.UserState = Properties.Resources.ConversionStateReadDocument; - - using (MagickImageCollection images = new MagickImageCollection()) - { - // Add all the pages of the pdf file to the collection - images.Read(this.InputFilePath, settings); - Debug.Log($"Load pdf {this.InputFilePath} succeed."); - - this.pageCount = images.Count; - - this.UserState = Properties.Resources.ConversionStateConversion; - - foreach (MagickImage image in images) - { - Debug.Log($"Write page {this.CurrentOutputFilePathIndex + 1}/{this.pageCount}."); - - if (PdfSuperSamplingRatio > 1) - { -#pragma warning disable CS0162 // Unreachable code detected - image.Scale(new Percentage(100 / PdfSuperSamplingRatio)); -#pragma warning restore CS0162 // Unreachable code detected - } - - this.ConvertImage(image, true); - - this.CurrentOutputFilePathIndex++; - } - } - } - - private void ConvertImage(MagickImage image, bool ignoreScale = false) - { - image.Progress += this.Image_Progress; - - if (!ignoreScale && this.ConversionPreset.IsRelevantSetting(ConversionPreset.ConversionSettingKeys.ImageScale)) - { - float scaleFactor = this.ConversionPreset.GetSettingsValue(ConversionPreset.ConversionSettingKeys.ImageScale); - if (Math.Abs(scaleFactor - 1f) >= 0.005f) - { - Debug.Log($"Apply scale factor: {scaleFactor * 100}%."); - - image.Scale(new Percentage(scaleFactor * 100f)); - } - } - - if (this.ConversionPreset.IsRelevantSetting(ConversionPreset.ConversionSettingKeys.ImageRotation)) - { - float rotateAngleInDegrees = this.ConversionPreset.GetSettingsValue(ConversionPreset.ConversionSettingKeys.ImageRotation); - if (Math.Abs(rotateAngleInDegrees - 0f) >= 0.05f) - { - Debug.Log($"Apply rotation: {rotateAngleInDegrees}°."); - - image.Rotate(rotateAngleInDegrees); - } - } - - if (this.ConversionPreset.IsRelevantSetting(ConversionPreset.ConversionSettingKeys.ImageClampSizePowerOf2)) - { - bool clampSizeToPowerOf2 = this.ConversionPreset.GetSettingsValue(ConversionPreset.ConversionSettingKeys.ImageClampSizePowerOf2); - if (clampSizeToPowerOf2) - { - int referenceSize = System.Math.Min(image.Width, image.Height); - int size = 2; - while (size * 2 <= referenceSize) - { - size *= 2; - } - - Debug.Log($"Clamp size to the nearest power of 2 size (from {image.Width}x{image.Height} to {size}x{size})."); - - image.Scale(size, size); - } - } - - if (this.ConversionPreset.IsRelevantSetting(ConversionPreset.ConversionSettingKeys.ImageMaximumSize)) - { - int maximumSize = this.ConversionPreset.GetSettingsValue(ConversionPreset.ConversionSettingKeys.ImageMaximumSize); - if (maximumSize > 0) - { - int width = System.Math.Min(image.Width, maximumSize); - int height = System.Math.Min(image.Height, maximumSize); - - Debug.Log($"Clamp size to maximum size of {width}x{width} (from {image.Width}x{image.Height} to {width}x{height})."); - - image.Scale(width, height); - } - } - - Debug.Log($"Convert image (output: {this.OutputFilePath})."); - switch (this.ConversionPreset.OutputType) - { - case OutputType.Png: - // http://stackoverflow.com/questions/27267073/imagemagick-lossless-max-compression-for-png - image.Quality = 95; - break; - - case OutputType.Jpg: - image.Quality = this.ConversionPreset.GetSettingsValue(ConversionPreset.ConversionSettingKeys.ImageQuality); - break; - - case OutputType.Pdf: - Debug.Log($"Density: {BaseDpiForPdfConversion}dpi."); - image.Density = new Density(BaseDpiForPdfConversion); - break; - - case OutputType.Webp: - image.Quality = this.ConversionPreset.GetSettingsValue(ConversionPreset.ConversionSettingKeys.ImageQuality); - break; - - default: - this.ConversionFailed(string.Format(Properties.Resources.ErrorUnsupportedOutputFormat, this.ConversionPreset.OutputType)); - image.Progress -= this.Image_Progress; - return; - } - - image.Write(this.OutputFilePath); - image.Progress -= this.Image_Progress; - } - - private void Image_Progress(object sender, ProgressEventArgs eventArgs) - { - if (this.CancelIsRequested) - { - eventArgs.Cancel = true; - return; - } - - float alreadyCompletedPages = this.CurrentOutputFilePathIndex / (float)this.pageCount; - this.Progress = alreadyCompletedPages + ((float)eventArgs.Progress.ToDouble() / (100f * this.pageCount)); - } - } -} + default: + break; + } + + using (MagickImage image = new MagickImage(this.InputFilePath, readSettings)) + { + Debug.Log($"Load image {this.InputFilePath} succeed."); + this.ConvertImage(image); + } + } + } + + private void ConvertPdf() + { + MagickReadSettings settings = new MagickReadSettings(); + + float dpi = BaseDpiForPdfConversion; + float scaleFactor = this.ConversionPreset.GetSettingsValue(ConversionPreset.ConversionSettingKeys.ImageScale); + if (Math.Abs(scaleFactor - 1f) >= 0.005f) + { + Debug.Log($"Apply scale factor: {scaleFactor * 100}%."); + + dpi *= scaleFactor; + } + + Debug.Log($"Density: {dpi}dpi."); + settings.Density = new Density(dpi * PdfSuperSamplingRatio); + + this.UserState = Properties.Resources.ConversionStateReadDocument; + + using (MagickImageCollection images = new MagickImageCollection()) + { + // Add all the pages of the pdf file to the collection + images.Read(this.InputFilePath, settings); + Debug.Log($"Load pdf {this.InputFilePath} succeed."); + + this.pageCount = images.Count; + + this.UserState = Properties.Resources.ConversionStateConversion; + + foreach (MagickImage image in images) + { + Debug.Log($"Write page {this.CurrentOutputFilePathIndex + 1}/{this.pageCount}."); + + if (PdfSuperSamplingRatio > 1) + { +#pragma warning disable CS0162 // Unreachable code detected + image.Scale(new Percentage(100 / PdfSuperSamplingRatio)); +#pragma warning restore CS0162 // Unreachable code detected + } + + this.ConvertImage(image, true); + + this.CurrentOutputFilePathIndex++; + } + } + } + + private void ConvertImage(MagickImage image, bool ignoreScale = false) + { + image.Progress += this.Image_Progress; + + if (!ignoreScale && this.ConversionPreset.IsRelevantSetting(ConversionPreset.ConversionSettingKeys.ImageScale)) + { + float scaleFactor = this.ConversionPreset.GetSettingsValue(ConversionPreset.ConversionSettingKeys.ImageScale); + if (Math.Abs(scaleFactor - 1f) >= 0.005f) + { + Debug.Log($"Apply scale factor: {scaleFactor * 100}%."); + + image.Scale(new Percentage(scaleFactor * 100f)); + } + } + + if (this.ConversionPreset.IsRelevantSetting(ConversionPreset.ConversionSettingKeys.ImageRotation)) + { + float rotateAngleInDegrees = this.ConversionPreset.GetSettingsValue(ConversionPreset.ConversionSettingKeys.ImageRotation); + if (Math.Abs(rotateAngleInDegrees - 0f) >= 0.05f) + { + Debug.Log($"Apply rotation: {rotateAngleInDegrees}°."); + + image.Rotate(rotateAngleInDegrees); + } + } + + if (this.ConversionPreset.IsRelevantSetting(ConversionPreset.ConversionSettingKeys.ImageClampSizePowerOf2)) + { + bool clampSizeToPowerOf2 = this.ConversionPreset.GetSettingsValue(ConversionPreset.ConversionSettingKeys.ImageClampSizePowerOf2); + if (clampSizeToPowerOf2) + { + int referenceSize = System.Math.Min((int)image.Width, (int)image.Height); + int size = 2; + while (size * 2 <= referenceSize) + { + size *= 2; + } + + Debug.Log($"Clamp size to the nearest power of 2 size (from {image.Width}x{image.Height} to {size}x{size})."); + + image.Scale((uint)size, (uint)size); + } + } + + if (this.ConversionPreset.IsRelevantSetting(ConversionPreset.ConversionSettingKeys.ImageMaximumSize)) + { + int maximumSize = this.ConversionPreset.GetSettingsValue(ConversionPreset.ConversionSettingKeys.ImageMaximumSize); + if (maximumSize > 0) + { + int width = System.Math.Min((int)image.Width, (int)maximumSize); + int height = System.Math.Min((int)image.Height, maximumSize); + + Debug.Log($"Clamp size to maximum size of {width}x{width} (from {image.Width}x{image.Height} to {width}x{height})."); + + image.Scale((uint)width, (uint)height); + } + } + + Debug.Log($"Convert image (output: {this.OutputFilePath})."); + switch (this.ConversionPreset.OutputType) + { + case OutputType.Png: + // http://stackoverflow.com/questions/27267073/imagemagick-lossless-max-compression-for-png + image.Quality = 95; + break; + + case OutputType.Jpg: + image.Quality = (uint)this.ConversionPreset.GetSettingsValue(ConversionPreset.ConversionSettingKeys.ImageQuality); + break; + + case OutputType.Pdf: + Debug.Log($"Density: {BaseDpiForPdfConversion}dpi."); + image.Density = new Density(BaseDpiForPdfConversion); + break; + + case OutputType.Webp: + image.Quality = (uint)this.ConversionPreset.GetSettingsValue(ConversionPreset.ConversionSettingKeys.ImageQuality); + break; + + default: + this.ConversionFailed(string.Format(Properties.Resources.ErrorUnsupportedOutputFormat, this.ConversionPreset.OutputType)); + image.Progress -= this.Image_Progress; + return; + } + + image.Write(this.OutputFilePath); + image.Progress -= this.Image_Progress; + } + + private void Image_Progress(object sender, ProgressEventArgs eventArgs) + { + if (this.CancelIsRequested) + { + eventArgs.Cancel = true; + return; + } + + float alreadyCompletedPages = this.CurrentOutputFilePathIndex / (float)this.pageCount; + this.Progress = alreadyCompletedPages + ((float)eventArgs.Progress.ToDouble() / (100f * this.pageCount)); + } + } +} diff --git a/Application/FileConverter/FileConverter.csproj b/Application/FileConverter/FileConverter.csproj index afbc645..9cba655 100644 --- a/Application/FileConverter/FileConverter.csproj +++ b/Application/FileConverter/FileConverter.csproj @@ -1,452 +1,450 @@ - - - - - Debug - AnyCPU - {D27A76D2-43E4-43CC-9DA3-334B0B46F4E5} - WinExe - Properties - FileConverter - FileConverter - v4.8 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - - - - - - AnyCPU - true - full - false - bin\Debug\ - TRACE;DEBUG - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - x64 - bin\x64\Debug\ - TRACE;DEBUG - - - x64 - bin\x64\Release\ - - - Resources\ApplicationIcon.ico - - - true - bin\x86\Debug\ - TRACE;DEBUG;BUILD32 - full - x86 - prompt - MinimumRecommendedRules.ruleset - true - - - bin\x86\Release\ - TRACE;BUILD32 - true - pdbonly - x86 - prompt - MinimumRecommendedRules.ruleset - true - - - - ..\..\packages\CommunityToolkit.Mvvm.8.2.2\lib\netstandard2.0\CommunityToolkit.Mvvm.dll - - - ..\..\packages\Magick.NET-Q16-AnyCPU.13.5.0\lib\netstandard20\Magick.NET-Q16-AnyCPU.dll - True - - - ..\..\packages\Magick.NET.Core.13.5.0\lib\netstandard20\Magick.NET.Core.dll - True - - - ..\..\Middleware\Markdown.Xaml.dll - - - ..\..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll - - - ..\..\packages\Microsoft.Extensions.DependencyInjection.8.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.dll - - - ..\..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.8.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.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\Microsoft.Xaml.Behaviors.Wpf.1.1.77\lib\net462\Microsoft.Xaml.Behaviors.dll - - - ..\..\packages\Office.12.0.0\lib\net40\Office.dll - True - - - - False - ..\..\Middleware\Ripper.dll - - - ..\..\packages\SharpShell.2.7.2\lib\net40-client\SharpShell.dll - - - - ..\..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll - - - ..\..\packages\System.ComponentModel.Annotations.5.0.0\lib\net461\System.ComponentModel.Annotations.dll - - - - - - ..\..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll - - - - ..\..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll - - - ..\..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll - - - ..\..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll - - - - - - - 4.0 - - - - - - - - ..\..\packages\WpfAnimatedGif.2.0.2\lib\net40\WpfAnimatedGif.dll - - - ..\..\Middleware\yeti.mmedia.dll - - - - - MSBuild:Compile - Designer - - - - ConversionJobControl.xaml - - - - EncodingQualitySliderControl.xaml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Resources.en.resx - True - True - True - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - HelpWindow.xaml - - - DiagnosticsWindow.xaml - - - - - - SettingsWindow.xaml - - - - UpgradeWindow.xaml - - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - Application.xaml - Code - - - - - - MainWindow.xaml - Code - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - - - - true - - - Code - true - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - - - - - PublicResXFileCodeGenerator - Resources.en.Designer.cs - - - - - - - PublicResXFileCodeGenerator - Resources.Designer.cs - Designer - - - - - - - - Designer - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - - Designer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {0c44ca69-42d6-4357-bdfd-83069d1aba2f} - FileConverterExtension - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + Debug + AnyCPU + {D27A76D2-43E4-43CC-9DA3-334B0B46F4E5} + WinExe + Properties + FileConverter + FileConverter + v4.8 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + + + + + + AnyCPU + true + full + false + bin\Debug\ + TRACE;DEBUG + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + x64 + bin\x64\Debug\ + TRACE;DEBUG + + + x64 + bin\x64\Release\ + + + Resources\ApplicationIcon.ico + + + true + bin\x86\Debug\ + TRACE;DEBUG;BUILD32 + full + x86 + prompt + MinimumRecommendedRules.ruleset + true + + + bin\x86\Release\ + TRACE;BUILD32 + true + pdbonly + x86 + prompt + MinimumRecommendedRules.ruleset + true + + + + ..\..\packages\CommunityToolkit.Mvvm.8.2.2\lib\netstandard2.0\CommunityToolkit.Mvvm.dll + + + ..\..\packages\Magick.NET-Q16-AnyCPU.14.2.0\lib\netstandard20\Magick.NET-Q16-AnyCPU.dll + + + ..\..\packages\Magick.NET.Core.14.2.0\lib\netstandard20\Magick.NET.Core.dll + + + ..\..\Middleware\Markdown.Xaml.dll + + + ..\..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll + + + ..\..\packages\Microsoft.Extensions.DependencyInjection.8.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.dll + + + ..\..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.8.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.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\Microsoft.Xaml.Behaviors.Wpf.1.1.77\lib\net462\Microsoft.Xaml.Behaviors.dll + + + ..\..\packages\Office.12.0.0\lib\net40\Office.dll + True + + + + False + ..\..\Middleware\Ripper.dll + + + ..\..\packages\SharpShell.2.7.2\lib\net40-client\SharpShell.dll + + + + ..\..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + + ..\..\packages\System.ComponentModel.Annotations.5.0.0\lib\net461\System.ComponentModel.Annotations.dll + + + + + + ..\..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll + + + + ..\..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + + ..\..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + + ..\..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll + + + + + + + 4.0 + + + + + + + + ..\..\packages\WpfAnimatedGif.2.0.2\lib\net40\WpfAnimatedGif.dll + + + ..\..\Middleware\yeti.mmedia.dll + + + + + MSBuild:Compile + Designer + + + + ConversionJobControl.xaml + + + + EncodingQualitySliderControl.xaml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Resources.en.resx + True + True + True + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + HelpWindow.xaml + + + DiagnosticsWindow.xaml + + + + + + SettingsWindow.xaml + + + + UpgradeWindow.xaml + + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + MSBuild:Compile + Designer + + + Application.xaml + Code + + + + + + MainWindow.xaml + Code + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + + + + true + + + Code + true + + + True + True + Resources.resx + + + True + Settings.settings + True + + + + + + + + + PublicResXFileCodeGenerator + Resources.en.Designer.cs + + + + + + + PublicResXFileCodeGenerator + Resources.Designer.cs + Designer + + + + + + + + Designer + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + Designer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {0c44ca69-42d6-4357-bdfd-83069d1aba2f} + FileConverterExtension + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + copy /Y "$(SolutionDir)Middleware\ffmpeg\ffmpeg.exe" "$(TargetDir)ffmpeg.exe" copy /Y "$(SolutionDir)Middleware\gs\gsdll64.dll" "$(TargetDir)gsdll64.dll" copy /Y "$(SolutionDir)Middleware\gs\gswin64c.exe" "$(TargetDir)gswin64c.exe" @@ -454,22 +452,22 @@ copy /Y "$(ProjectDir)Settings.default.xml" "$(TargetDir)Settings.default.xml" robocopy $(TargetDir) $(TargetDir)\Languages "$(TargetName).resources.dll" /CREATE /S /XD Languages /IS /IT /NFL /NDL /NJH /NJS /NC /NS /NP if %25errorlevel%25 leq 1 exit 0 else exit %25errorlevel%25 robocopy $(TargetDir) $(TargetDir)\Languages "$(TargetName).resources.dll" /MOVE /S /XD Languages /XL /IS /IT /NFL /NDL /NJH /NJS /NC /NS /NP -if %25errorlevel%25 leq 1 exit 0 else exit %25errorlevel%25 - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - +if %25errorlevel%25 leq 1 exit 0 else exit %25errorlevel%25 + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + --> \ No newline at end of file diff --git a/Application/FileConverter/packages.config b/Application/FileConverter/packages.config index dd2d9fb..2f9abf0 100644 --- a/Application/FileConverter/packages.config +++ b/Application/FileConverter/packages.config @@ -1,22 +1,22 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a5c548..b6294fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - New: Persian translation (thanks to MrHero118). - Fixes: Hebrew translation issues (thanks to AshiVered). - New: Add Gif to Image conversion support (issue #433, #115) +- Fixes: Update to Magick.NET.Core 14.2.0 (issue #527) ## Version 2.0.2 diff --git a/README.md b/README.md index 4b9b07e..c6032e2 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ File converter uses the following middlewares: **ffmpeg** (v6.1.1) as file conversion software. Thanks to ffmpeg devs for this awesome open source file conversion tool. [Web site link](https://ffmpeg.org) -**ImageMagick** (v13.5) as image edition and conversion software. +**ImageMagick** (v14.2) as image edition and conversion software. Thanks to image magick devs for this awesome open source image edition software suite. [Web site link](http://imagemagick.net) And thanks to dlemstra for the C# wrapper of this software. [Github link](https://github.com/ImageMagick/ImageMagick)