diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..99a1b50
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "MaddoLibrary"]
+ path = MaddoLibrary
+ url = git@gitlab.com:MaddoTools/MaddoLibrary.git
diff --git a/Catalog.sln b/Catalog.sln
index 05e37b1..0cc7def 100644
--- a/Catalog.sln
+++ b/Catalog.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
-VisualStudioVersion = 15.0.26403.3
+VisualStudioVersion = 15.0.26730.15
MinimumVisualStudioVersion = 10.0.40219.1
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ImageCatalog 2", "imagecatalog\ImageCatalog 2.vbproj", "{8D3AA2B0-8F06-4A61-9CAD-B920EB1A8E9C}"
EndProject
@@ -15,6 +15,10 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "CatalogVbLib", "CatalogVbLi
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{A3D50937-74F6-4DC8-8D89-B534B484C0F9}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MaddoLibrary.Base.NET46", "MaddoLibrary\MaddoLibrary.Base.NET46\MaddoLibrary.Base.NET46.csproj", "{E93DAAE6-4AA9-4A45-AFB6-58209B3AD3C9}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MaddoLibrary.WPF.NET46", "MaddoLibrary\MaddoLibrary.WPF.NET46\MaddoLibrary.WPF.NET46.csproj", "{73DA19D7-196D-4B16-B610-93250978A607}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -74,8 +78,39 @@ Global
{44465926-240D-473F-90B8-786BA4384406}.Release|x64.ActiveCfg = Release|x64
{44465926-240D-473F-90B8-786BA4384406}.Release|x64.Build.0 = Release|x64
{44465926-240D-473F-90B8-786BA4384406}.Release|x86.ActiveCfg = Release|Any CPU
+ {E93DAAE6-4AA9-4A45-AFB6-58209B3AD3C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E93DAAE6-4AA9-4A45-AFB6-58209B3AD3C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E93DAAE6-4AA9-4A45-AFB6-58209B3AD3C9}.Debug|x64.ActiveCfg = Debug|x64
+ {E93DAAE6-4AA9-4A45-AFB6-58209B3AD3C9}.Debug|x64.Build.0 = Debug|x64
+ {E93DAAE6-4AA9-4A45-AFB6-58209B3AD3C9}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {E93DAAE6-4AA9-4A45-AFB6-58209B3AD3C9}.Debug|x86.Build.0 = Debug|Any CPU
+ {E93DAAE6-4AA9-4A45-AFB6-58209B3AD3C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E93DAAE6-4AA9-4A45-AFB6-58209B3AD3C9}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E93DAAE6-4AA9-4A45-AFB6-58209B3AD3C9}.Release|x64.ActiveCfg = Release|Any CPU
+ {E93DAAE6-4AA9-4A45-AFB6-58209B3AD3C9}.Release|x64.Build.0 = Release|Any CPU
+ {E93DAAE6-4AA9-4A45-AFB6-58209B3AD3C9}.Release|x86.ActiveCfg = Release|Any CPU
+ {E93DAAE6-4AA9-4A45-AFB6-58209B3AD3C9}.Release|x86.Build.0 = Release|Any CPU
+ {73DA19D7-196D-4B16-B610-93250978A607}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {73DA19D7-196D-4B16-B610-93250978A607}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {73DA19D7-196D-4B16-B610-93250978A607}.Debug|x64.ActiveCfg = Debug|x64
+ {73DA19D7-196D-4B16-B610-93250978A607}.Debug|x64.Build.0 = Debug|x64
+ {73DA19D7-196D-4B16-B610-93250978A607}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {73DA19D7-196D-4B16-B610-93250978A607}.Debug|x86.Build.0 = Debug|Any CPU
+ {73DA19D7-196D-4B16-B610-93250978A607}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {73DA19D7-196D-4B16-B610-93250978A607}.Release|Any CPU.Build.0 = Release|Any CPU
+ {73DA19D7-196D-4B16-B610-93250978A607}.Release|x64.ActiveCfg = Release|x64
+ {73DA19D7-196D-4B16-B610-93250978A607}.Release|x64.Build.0 = Release|x64
+ {73DA19D7-196D-4B16-B610-93250978A607}.Release|x86.ActiveCfg = Release|Any CPU
+ {73DA19D7-196D-4B16-B610-93250978A607}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {E93DAAE6-4AA9-4A45-AFB6-58209B3AD3C9} = {A3D50937-74F6-4DC8-8D89-B534B484C0F9}
+ {73DA19D7-196D-4B16-B610-93250978A607} = {A3D50937-74F6-4DC8-8D89-B534B484C0F9}
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {5915F930-025D-4D6A-8C42-D62B76DB38BD}
+ EndGlobalSection
EndGlobal
diff --git a/CatalogLib/CatalogLib.csproj b/CatalogLib/CatalogLib.csproj
index e3c1c2a..a5aecf8 100644
--- a/CatalogLib/CatalogLib.csproj
+++ b/CatalogLib/CatalogLib.csproj
@@ -162,7 +162,6 @@
-
@@ -172,6 +171,10 @@
{44465926-240d-473f-90b8-786ba4384406}
CatalogVbLib
+
+ {e93daae6-4aa9-4a45-afb6-58209b3ad3c9}
+ MaddoLibrary.Base.NET46
+
diff --git a/CatalogLib/ImgSharpCreator.cs b/CatalogLib/ImgSharpCreator.cs
index 50da2a9..7e739cf 100644
--- a/CatalogLib/ImgSharpCreator.cs
+++ b/CatalogLib/ImgSharpCreator.cs
@@ -5,7 +5,7 @@ using System.IO;
using System.Linq;
using System.Numerics;
using System.Threading.Tasks;
-using NLog;
+using MaddoLibrary.Base.Log;
using SixLabors.Fonts;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Drawing;
@@ -29,11 +29,13 @@ namespace CatalogLib
using (Image image = Image.Load(workFile.FullName)/* new Image(workFile.FullName)*/)
{
+ MaddoLogger.Log("Loaded Image: {0}", workFile.FullName);
//image.Rotate(-90);
if (PicSettings.Instance.GeneraleRotazioneAutomatica)
{
image.Mutate(img => img.AutoOrient());
+ MaddoLogger.Log("Rotated Image: {0}", workFile.FullName);
//image.AutoOrient();
//var exif = image.MetaData.ExifProfile;
@@ -98,12 +100,13 @@ namespace CatalogLib
if (PicSettings.Instance.EnableText)
{
SetExtraText(image);
+ MaddoLogger.Log("Drawn text on Image: {0}", workFile.FullName);
}
//JpegDecoder j = new JpegDecoder();
var va = Vector.IsHardwareAccelerated;
- Debug.WriteLine($"Hardware Accelerated: {va}");
-
+
+ MaddoLogger.Log("Hardware Accelerated: {0}", va);
//image.Resize(PicSettings.Instance.FotoLarghezza, PicSettings.Instance.FotoAltezza);
//image.Resize(2240, 2240);
@@ -112,6 +115,8 @@ namespace CatalogLib
//image.DrawText("sssssssssssssssssssssssssssssssssssssssssssssss", font, Color.Black, new Vector2(200, 200));
image.Save(Path.Combine(PicSettings.Instance.DirectoryDestinazione, workFile.Name));
//image.Resize(200, 200).Save("");
+
+ MaddoLogger.Log("Saved Image: {0} to: {1}", workFile.FullName, Path.Combine(PicSettings.Instance.DirectoryDestinazione, workFile.Name));
}
}
@@ -151,8 +156,8 @@ namespace CatalogLib
float scalingFactor = Math.Min(image.Width / size.Width, image.Height / size.Height);
Font scaledFont = new Font(font, scalingFactor * font.Size);
-
- image.DrawText(PicSettings.Instance.TestoApplicareOrizzontale, scaledFont, g, center, new TextGraphicsOptions(true) { HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Bottom });
+ image.Mutate(x => x.DrawText(PicSettings.Instance.TestoApplicareOrizzontale, scaledFont, g, center, new TextGraphicsOptions(true) { HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Bottom }));
+ //image.DrawText(PicSettings.Instance.TestoApplicareOrizzontale, scaledFont, g, center, new TextGraphicsOptions(true) { HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Bottom });
}
@@ -166,7 +171,7 @@ namespace CatalogLib
var size = TextMeasurer.Measure("Test test test test test", new RendererOptions(font));
float scalingFactor = Math.Min(image.Width / size.Width, image.Height / size.Height);
Font scaledFont = new Font(font, scalingFactor * font.Size);
- image.DrawText("Test test test test test", scaledFont, g, center, new TextGraphicsOptions(true) { HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Bottom });
+ image.Mutate(x => x.DrawText("Test test test test test", scaledFont, g, center, new TextGraphicsOptions(true) { HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Bottom }));
}
private string FlipRgbString(string originalString)
diff --git a/CatalogLib/MaddoLogger.cs b/CatalogLib/MaddoLogger.cs
deleted file mode 100644
index 3eba4b7..0000000
--- a/CatalogLib/MaddoLogger.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-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/MaddoLibrary b/MaddoLibrary
new file mode 160000
index 0000000..d9b6b42
--- /dev/null
+++ b/MaddoLibrary
@@ -0,0 +1 @@
+Subproject commit d9b6b42b847a86423577b66a74320fe90669fc2e
diff --git a/WPFCatalog/WPFCatalog.csproj b/WPFCatalog/WPFCatalog.csproj
index f1c1b72..baf5b7a 100644
--- a/WPFCatalog/WPFCatalog.csproj
+++ b/WPFCatalog/WPFCatalog.csproj
@@ -66,14 +66,6 @@
..\packages\MvvmLightLibs.4.1.27.1\lib\net45\GalaSoft.MvvmLight.WPF45.dll
-
- False
- ..\lib\MaddoLibrary.Base.NET45.dll
-
-
- False
- ..\lib\MaddoLibrary.WPF.NET46.dll
-
..\packages\MahApps.Metro.1.5.0\lib\net45\MahApps.Metro.dll
@@ -86,9 +78,8 @@
-
- ..\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
@@ -233,6 +224,14 @@
{d27accf2-80fc-4de8-aeb8-351ff076e6d5}
CatalogLib
+
+ {e93daae6-4aa9-4a45-afb6-58209b3ad3c9}
+ MaddoLibrary.Base.NET46
+
+
+ {73da19d7-196d-4b16-b610-93250978a607}
+ MaddoLibrary.WPF.NET46
+
diff --git a/WPFCatalog/packages.config b/WPFCatalog/packages.config
index 189ae99..183cb0a 100644
--- a/WPFCatalog/packages.config
+++ b/WPFCatalog/packages.config
@@ -6,5 +6,5 @@
-
+
\ No newline at end of file