diff --git a/CatalogLib/CatalogLib.csproj b/CatalogLib/CatalogLib.csproj index 8657ce6..e3c1c2a 100644 --- a/CatalogLib/CatalogLib.csproj +++ b/CatalogLib/CatalogLib.csproj @@ -53,12 +53,6 @@ MinimumRecommendedRules.ruleset - - ..\packages\ImageSharp.1.0.0-alpha9-00169\lib\netstandard1.3\ImageSharp.dll - - - ..\packages\ImageSharp.Drawing.1.0.0-alpha9-00164\lib\netstandard1.1\ImageSharp.Drawing.dll - ..\packages\Microsoft.Win32.Primitives.4.3.0\lib\net46\Microsoft.Win32.Primitives.dll @@ -66,28 +60,33 @@ ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll True - - ..\packages\SixLabors.Core.0.1.0-alpha0002\lib\netstandard1.1\SixLabors.Core.dll + + ..\packages\SixLabors.Core.1.0.0-beta0002\lib\netstandard1.1\SixLabors.Core.dll - ..\packages\SixLabors.Fonts.0.1.0-alpha0014\lib\netstandard1.3\SixLabors.Fonts.dll + ..\packages\SixLabors.Fonts.1.0.0-beta0001\lib\netstandard1.3\SixLabors.Fonts.dll + + + ..\packages\SixLabors.ImageSharp.1.0.0-beta0001\lib\netstandard1.3\SixLabors.ImageSharp.dll + + + ..\packages\SixLabors.ImageSharp.Drawing.1.0.0-beta0001\lib\netstandard1.1\SixLabors.ImageSharp.Drawing.dll - ..\packages\SixLabors.Shapes.0.1.0-alpha0018\lib\netstandard1.1\SixLabors.Shapes.dll + ..\packages\SixLabors.Shapes.1.0.0-beta0001\lib\netstandard1.1\SixLabors.Shapes.dll - ..\packages\SixLabors.Shapes.Text.0.1.0-alpha0018\lib\netstandard1.1\SixLabors.Shapes.Text.dll + ..\packages\SixLabors.Shapes.Text.1.0.0-beta0001\lib\netstandard1.1\SixLabors.Shapes.Text.dll ..\packages\System.AppContext.4.3.0\lib\net46\System.AppContext.dll - - ..\packages\System.Buffers.4.3.0\lib\netstandard1.1\System.Buffers.dll + + ..\packages\System.Buffers.4.4.0\lib\netstandard1.1\System.Buffers.dll - - ..\packages\System.Collections.Immutable.1.3.1\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll - True + + ..\packages\System.Collections.Immutable.1.4.0\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll @@ -115,7 +114,7 @@ ..\packages\System.IO.FileSystem.Primitives.4.3.0\lib\net46\System.IO.FileSystem.Primitives.dll - ..\packages\System.Memory.4.4.0-preview1-25305-02\lib\netstandard1.0\System.Memory.dll + ..\packages\System.Memory.4.4.0-preview2-25405-01\lib\netstandard1.0\System.Memory.dll ..\packages\System.Net.Http.4.3.0\lib\net46\System.Net.Http.dll @@ -124,11 +123,11 @@ ..\packages\System.Net.Sockets.4.3.0\lib\net46\System.Net.Sockets.dll - - ..\packages\System.Numerics.Vectors.4.3.0\lib\net46\System.Numerics.Vectors.dll + + ..\packages\System.Numerics.Vectors.4.4.0\lib\net46\System.Numerics.Vectors.dll - ..\packages\System.Runtime.CompilerServices.Unsafe.4.4.0-preview1-25305-02\lib\netstandard1.0\System.Runtime.CompilerServices.Unsafe.dll + ..\packages\System.Runtime.CompilerServices.Unsafe.4.4.0\lib\netstandard1.0\System.Runtime.CompilerServices.Unsafe.dll ..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll @@ -146,7 +145,7 @@ ..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net46\System.Security.Cryptography.X509Certificates.dll - ..\packages\System.ValueTuple.4.4.0-preview1-25305-02\lib\netstandard1.0\System.ValueTuple.dll + ..\packages\System.ValueTuple.4.4.0\lib\netstandard1.0\System.ValueTuple.dll @@ -177,6 +176,7 @@ + diff --git a/CatalogLib/ImgSharpCreator.cs b/CatalogLib/ImgSharpCreator.cs index 1f5ac0d..50da2a9 100644 --- a/CatalogLib/ImgSharpCreator.cs +++ b/CatalogLib/ImgSharpCreator.cs @@ -1,27 +1,25 @@ using System; using System.Collections.Generic; using System.Diagnostics; -using System.Drawing; using System.IO; using System.Linq; using System.Numerics; -using System.Text; using System.Threading.Tasks; -using ImageSharp; -using ImageSharp.Drawing; -using ImageSharp.PixelFormats; -using ImageSharp.Processing; +using NLog; using SixLabors.Fonts; +using SixLabors.ImageSharp; +using SixLabors.ImageSharp.Drawing; using Font = SixLabors.Fonts.Font; using FontFamily = SixLabors.Fonts.FontFamily; using FontStyle = SixLabors.Fonts.FontStyle; -using Image = ImageSharp.Image; - +using Rgba32 = SixLabors.ImageSharp.Rgba32; +using Image = SixLabors.ImageSharp.Image; namespace CatalogLib { public class ImgSharpCreator : IImageProcessor { + private FileInfo _currentFile; public void Start(FileInfo workFile) { @@ -35,7 +33,8 @@ namespace CatalogLib if (PicSettings.Instance.GeneraleRotazioneAutomatica) { - image.AutoOrient(); + image.Mutate(img => img.AutoOrient()); + //image.AutoOrient(); //var exif = image.MetaData.ExifProfile; //if (exif != null) @@ -103,7 +102,8 @@ namespace CatalogLib //JpegDecoder j = new JpegDecoder(); var va = Vector.IsHardwareAccelerated; - + Debug.WriteLine($"Hardware Accelerated: {va}"); + //image.Resize(PicSettings.Instance.FotoLarghezza, PicSettings.Instance.FotoAltezza); //image.Resize(2240, 2240); diff --git a/CatalogLib/app.config b/CatalogLib/app.config index b5d559f..3fcefdf 100644 --- a/CatalogLib/app.config +++ b/CatalogLib/app.config @@ -16,11 +16,11 @@ - + - + diff --git a/CatalogLib/packages.config b/CatalogLib/packages.config index 8beea34..3740a21 100644 --- a/CatalogLib/packages.config +++ b/CatalogLib/packages.config @@ -1,20 +1,20 @@  - - - - - - + + + + + + - + - + @@ -29,18 +29,18 @@ - + - + - + @@ -57,7 +57,7 @@ - + \ No newline at end of file diff --git a/CatalogLib/stylecop.json b/CatalogLib/stylecop.json new file mode 100644 index 0000000..c67c0db --- /dev/null +++ b/CatalogLib/stylecop.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json", + "settings": + { + "orderingRules": + { + "usingDirectivesPlacement": "outsideNamespace" + }, + "documentationRules": + { + "xmlHeader": false, + "copyrightText": "Copyright (c) Six Labors and contributors.\nLicensed under the Apache License, Version 2.0." + } + } +} \ No newline at end of file diff --git a/WPFCatalog/App.config b/WPFCatalog/App.config index ff1c544..ca0daff 100644 --- a/WPFCatalog/App.config +++ b/WPFCatalog/App.config @@ -20,11 +20,11 @@ - + - + @@ -38,6 +38,14 @@ + + + + + + + +