From 1ac753e6ff5ab6ec920890e6db1b923853606eb9 Mon Sep 17 00:00:00 2001 From: Maddo Date: Thu, 16 Mar 2017 21:30:37 +0100 Subject: [PATCH] Automatic rotation v1 --- CatalogLib/CatalogLib.csproj | 94 +++++++++++++++++++++++++++++------ CatalogLib/ImgSharpCreator.cs | 8 +-- CatalogLib/MaddoLogger.cs | 18 +++++++ CatalogLib/app.config | 31 ++++++++++++ CatalogLib/packages.config | 66 ++++++++++++++++++++---- WPFCatalog/App.config | 32 +++++++++++- 6 files changed, 219 insertions(+), 30 deletions(-) create mode 100644 CatalogLib/MaddoLogger.cs create mode 100644 CatalogLib/app.config diff --git a/CatalogLib/CatalogLib.csproj b/CatalogLib/CatalogLib.csproj index 335f5b4..97c3989 100644 --- a/CatalogLib/CatalogLib.csproj +++ b/CatalogLib/CatalogLib.csproj @@ -36,42 +36,102 @@ - ..\packages\ImageSharp.1.0.0-alpha2-00115\lib\net45\ImageSharp.dll + ..\packages\ImageSharp.1.0.0-alpha3-00005\lib\netstandard1.3\ImageSharp.dll - ..\packages\ImageSharp.Drawing.1.0.0-alpha2-00115\lib\net45\ImageSharp.Drawing.dll + ..\packages\ImageSharp.Drawing.1.0.0-alpha3-00005\lib\netstandard1.1\ImageSharp.Drawing.dll - - ..\packages\ImageSharp.Formats.Jpeg.1.0.0-alpha2-00115\lib\net45\ImageSharp.Formats.Jpeg.dll + + ..\packages\ImageSharp.Drawing.Paths.1.0.0-alpha2-00107\lib\net45\ImageSharp.Drawing.Paths.dll - - ..\packages\ImageSharp.Formats.Png.1.0.0-alpha2-00111\lib\net45\ImageSharp.Formats.Png.dll + + ..\packages\ImageSharp.Drawing.Text.1.0.0-alpha2-00003\lib\net45\ImageSharp.Drawing.Text.dll - - ..\packages\ImageSharp.Processing.1.0.0-alpha2-00103\lib\net45\ImageSharp.Processing.dll + + ..\packages\Microsoft.Win32.Primitives.4.3.0\lib\net46\Microsoft.Win32.Primitives.dll ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll True + + ..\packages\SixLabors.Fonts.0.1.0-alpha0002\lib\netstandard1.3\SixLabors.Fonts.dll + + + ..\packages\SixLabors.Shapes.0.1.0-alpha0008\lib\netstandard1.1\SixLabors.Shapes.dll + - - ..\packages\System.Buffers.4.0.0\lib\netstandard1.1\System.Buffers.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.Collections.Immutable.1.3.1\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll + True + + + + ..\packages\System.Console.4.3.0\lib\net46\System.Console.dll - - - - ..\packages\System.Numerics.Vectors.4.1.1\lib\net46\System.Numerics.Vectors.dll + + ..\packages\System.Diagnostics.DiagnosticSource.4.3.0\lib\net46\System.Diagnostics.DiagnosticSource.dll - - ..\packages\System.Runtime.CompilerServices.Unsafe.4.0.0\lib\netstandard1.0\System.Runtime.CompilerServices.Unsafe.dll + + + ..\packages\System.Globalization.Calendars.4.3.0\lib\net46\System.Globalization.Calendars.dll + + + ..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll + + + + ..\packages\System.IO.Compression.ZipFile.4.3.0\lib\net46\System.IO.Compression.ZipFile.dll + + + ..\packages\System.IO.FileSystem.4.3.0\lib\net46\System.IO.FileSystem.dll + + + ..\packages\System.IO.FileSystem.Primitives.4.3.0\lib\net46\System.IO.FileSystem.Primitives.dll + + + ..\packages\System.Net.Http.4.3.0\lib\net46\System.Net.Http.dll + + + ..\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.Runtime.CompilerServices.Unsafe.4.3.0\lib\netstandard1.0\System.Runtime.CompilerServices.Unsafe.dll + + + ..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll + + + ..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net46\System.Security.Cryptography.Algorithms.dll + + + ..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll + + + ..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll + + + ..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net46\System.Security.Cryptography.X509Certificates.dll + + ..\packages\System.Xml.ReaderWriter.4.3.0\lib\net46\System.Xml.ReaderWriter.dll + @@ -79,6 +139,7 @@ + @@ -90,6 +151,7 @@ + diff --git a/CatalogLib/ImgSharpCreator.cs b/CatalogLib/ImgSharpCreator.cs index b62bf6e..ae8784e 100644 --- a/CatalogLib/ImgSharpCreator.cs +++ b/CatalogLib/ImgSharpCreator.cs @@ -5,8 +5,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using ImageSharp; -using ImageSharp.Formats; -using ImageSharp.Processing.Processors; + namespace CatalogLib { @@ -44,7 +43,10 @@ namespace CatalogLib case 2: break; case 3: - image.Rotate(180); + //image.Rotate(180f); + + //image.Rotate(90); + image.Rotate(180f); break; case 4: break; diff --git a/CatalogLib/MaddoLogger.cs b/CatalogLib/MaddoLogger.cs new file mode 100644 index 0000000..3eba4b7 --- /dev/null +++ b/CatalogLib/MaddoLogger.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CatalogLib +{ + public class MaddoLogger + { + public void AddToLog(string data) + { + string dest = Path.Combine(PicSettings.Instance.DirectoryDestinazione, "log.txt"); + + } + } +} diff --git a/CatalogLib/app.config b/CatalogLib/app.config new file mode 100644 index 0000000..e427ad3 --- /dev/null +++ b/CatalogLib/app.config @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CatalogLib/packages.config b/CatalogLib/packages.config index 3a28625..0c0fd12 100644 --- a/CatalogLib/packages.config +++ b/CatalogLib/packages.config @@ -1,13 +1,61 @@  - - - - - + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/WPFCatalog/App.config b/WPFCatalog/App.config index 2d2a12d..433728a 100644 --- a/WPFCatalog/App.config +++ b/WPFCatalog/App.config @@ -1,6 +1,34 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + +