Fixed compilation and added libraries
This commit is contained in:
parent
2822038123
commit
0d8ab38efd
8 changed files with 66 additions and 38 deletions
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[submodule "MaddoLibrary"]
|
||||
path = MaddoLibrary
|
||||
url = git@gitlab.com:MaddoTools/MaddoLibrary.git
|
||||
37
Catalog.sln
37
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
|
||||
|
|
|
|||
|
|
@ -162,7 +162,6 @@
|
|||
<Compile Include="ImageCreator.cs" />
|
||||
<Compile Include="ImageCreator2.cs" />
|
||||
<Compile Include="ImgSharpCreator.cs" />
|
||||
<Compile Include="MaddoLogger.cs" />
|
||||
<Compile Include="PicSettings.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="SinglePicData.cs" />
|
||||
|
|
@ -172,6 +171,10 @@
|
|||
<Project>{44465926-240d-473f-90b8-786ba4384406}</Project>
|
||||
<Name>CatalogVbLib</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\MaddoLibrary\MaddoLibrary.Base.NET46\MaddoLibrary.Base.NET46.csproj">
|
||||
<Project>{e93daae6-4aa9-4a45-afb6-58209b3ad3c9}</Project>
|
||||
<Name>MaddoLibrary.Base.NET46</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
|
|
|
|||
|
|
@ -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<Rgba32> 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)
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
1
MaddoLibrary
Submodule
1
MaddoLibrary
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit d9b6b42b847a86423577b66a74320fe90669fc2e
|
||||
|
|
@ -66,14 +66,6 @@
|
|||
<Reference Include="GalaSoft.MvvmLight.WPF45">
|
||||
<HintPath>..\packages\MvvmLightLibs.4.1.27.1\lib\net45\GalaSoft.MvvmLight.WPF45.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MaddoLibrary.Base.NET45, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\lib\MaddoLibrary.Base.NET45.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MaddoLibrary.WPF.NET46, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\lib\MaddoLibrary.WPF.NET46.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MahApps.Metro, Version=1.5.0.23, Culture=neutral, PublicKeyToken=f4fb5a3c4d1e5b4f, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MahApps.Metro.1.5.0\lib\net45\MahApps.Metro.dll</HintPath>
|
||||
</Reference>
|
||||
|
|
@ -86,9 +78,8 @@
|
|||
<Reference Include="PresentationUI, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
|
||||
<Reference Include="ReachFramework" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Collections.Immutable, Version=1.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Collections.Immutable.1.3.1\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Reference Include="System.Collections.Immutable, Version=1.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Collections.Immutable.1.4.0\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ComponentModel.Composition" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
|
|
@ -233,6 +224,14 @@
|
|||
<Project>{d27accf2-80fc-4de8-aeb8-351ff076e6d5}</Project>
|
||||
<Name>CatalogLib</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\MaddoLibrary\MaddoLibrary.Base.NET46\MaddoLibrary.Base.NET46.csproj">
|
||||
<Project>{e93daae6-4aa9-4a45-afb6-58209b3ad3c9}</Project>
|
||||
<Name>MaddoLibrary.Base.NET46</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\MaddoLibrary\MaddoLibrary.WPF.NET46\MaddoLibrary.WPF.NET46.csproj">
|
||||
<Project>{73da19d7-196d-4b16-b610-93250978a607}</Project>
|
||||
<Name>MaddoLibrary.WPF.NET46</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Icons\document-open-folder.png" />
|
||||
|
|
|
|||
|
|
@ -6,5 +6,5 @@
|
|||
<package id="MahApps.Metro.IconPacks" version="1.9.0" targetFramework="net46" />
|
||||
<package id="MvvmLight" version="4.1.27.1" targetFramework="net45" />
|
||||
<package id="MvvmLightLibs" version="4.1.27.1" targetFramework="net45" />
|
||||
<package id="System.Collections.Immutable" version="1.3.1" targetFramework="net46" />
|
||||
<package id="System.Collections.Immutable" version="1.4.0" targetFramework="net46" />
|
||||
</packages>
|
||||
Loading…
Add table
Add a link
Reference in a new issue