Moved to x64
This commit is contained in:
parent
7c1633261c
commit
71af9e7eeb
13 changed files with 308 additions and 39 deletions
|
|
@ -34,18 +34,30 @@
|
|||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ImageSharp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ImageSharp.1.0.0-alpha3-00005\lib\netstandard1.3\ImageSharp.dll</HintPath>
|
||||
<HintPath>..\packages\ImageSharp.1.0.0-alpha4-00046\lib\netstandard1.3\ImageSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ImageSharp.Drawing, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ImageSharp.Drawing.1.0.0-alpha3-00005\lib\netstandard1.1\ImageSharp.Drawing.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ImageSharp.Drawing.Paths, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ImageSharp.Drawing.Paths.1.0.0-alpha2-00107\lib\net45\ImageSharp.Drawing.Paths.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ImageSharp.Drawing.Text, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ImageSharp.Drawing.Text.1.0.0-alpha2-00003\lib\net45\ImageSharp.Drawing.Text.dll</HintPath>
|
||||
<HintPath>..\packages\ImageSharp.Drawing.1.0.0-alpha4-00046\lib\netstandard1.1\ImageSharp.Drawing.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Win32.Primitives, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Win32.Primitives.4.3.0\lib\net46\Microsoft.Win32.Primitives.dll</HintPath>
|
||||
|
|
@ -58,7 +70,7 @@
|
|||
<HintPath>..\packages\SixLabors.Fonts.0.1.0-alpha0002\lib\netstandard1.3\SixLabors.Fonts.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SixLabors.Shapes, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SixLabors.Shapes.0.1.0-alpha0008\lib\netstandard1.1\SixLabors.Shapes.dll</HintPath>
|
||||
<HintPath>..\packages\SixLabors.Shapes.0.1.0-alpha0009\lib\netstandard1.1\SixLabors.Shapes.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.AppContext, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
|
|
|
|||
|
|
@ -1,18 +1,29 @@
|
|||
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 SixLabors.Fonts;
|
||||
using Color = ImageSharp.Color;
|
||||
using Font = SixLabors.Fonts.Font;
|
||||
using FontFamily = SixLabors.Fonts.FontFamily;
|
||||
using FontStyle = SixLabors.Fonts.FontStyle;
|
||||
using Image = ImageSharp.Image;
|
||||
|
||||
|
||||
namespace CatalogLib
|
||||
{
|
||||
public class ImgSharpCreator : IImageProcessor
|
||||
{
|
||||
private FileInfo _currentFile;
|
||||
public void Start(FileInfo workFile)
|
||||
{
|
||||
_currentFile = workFile;
|
||||
using (Image image = new Image(workFile.FullName))
|
||||
{
|
||||
if (PicSettings.Instance.UsaRotazioneAutomatica)
|
||||
|
|
@ -68,16 +79,39 @@ namespace CatalogLib
|
|||
|
||||
}
|
||||
|
||||
SetExtraText(image);
|
||||
|
||||
//JpegDecoder j = new JpegDecoder();
|
||||
var va = Vector.IsHardwareAccelerated;
|
||||
|
||||
image.Resize(PicSettings.Instance.FotoLarghezza, PicSettings.Instance.FotoAltezza);
|
||||
//image.Resize(2240, 2240);
|
||||
//var fff = FontCollection.SystemFonts.Find(PicSettings.Instance.NomeFont);
|
||||
//var font = new Font(fff, (float)PicSettings.Instance.DimensioneFont, FontStyle.Regular);
|
||||
//image.DrawText("sssssssssssssssssssssssssssssssssssssssssssssss", font, Color.Black, new Vector2(200, 200));
|
||||
image.Save(Path.Combine(PicSettings.Instance.DirectoryDestinazione, workFile.Name));
|
||||
//image.Resize(200, 200).Save("");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void SetExtraText(ref Image image)
|
||||
private void SetExtraText(Image image)
|
||||
{
|
||||
//if ()
|
||||
if (string.IsNullOrWhiteSpace(PicSettings.Instance.TestoApplicareOrizzontale))
|
||||
{
|
||||
Debug.WriteLine($"{_currentFile.Name} No text");
|
||||
return;
|
||||
}
|
||||
var fff = FontCollection.SystemFonts.Find(PicSettings.Instance.NomeFont);
|
||||
//var fff = FontCollection.SystemFonts.Find("Segoe Print");
|
||||
|
||||
var font = new Font(fff, (float) PicSettings.Instance.DimensioneFont, FontStyle.Regular);
|
||||
//var font = new Font(fff, 8f, FontStyle.Regular);
|
||||
|
||||
|
||||
image.DrawText(PicSettings.Instance.TestoApplicareOrizzontale, font, Color.Black, new Vector2(200, 200));
|
||||
//image.DrawText("sssssssssssssssssssssssssssssssssssssssssssssss", font, Color.Black, new Vector2(200, 200));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ namespace CatalogLib
|
|||
// setdouble default
|
||||
}
|
||||
|
||||
return (T)_settingsDict[key];
|
||||
return (T)_settingsDict[key];
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -302,7 +302,7 @@ namespace CatalogLib
|
|||
|
||||
public bool GeneraleRotazioneAutomatica
|
||||
{
|
||||
get { return GetBool("GeneraleRotazioneAutomatica"); }
|
||||
get { return GetBool("GeneraleRotazioneAutomatica", true); }
|
||||
set { SetBool("GeneraleRotazioneAutomatica", value); }
|
||||
}
|
||||
|
||||
|
|
@ -378,7 +378,7 @@ namespace CatalogLib
|
|||
set { SetString("FotoSuffisso", value); }
|
||||
}
|
||||
|
||||
|
||||
|
||||
public bool EnableThumbnails
|
||||
{
|
||||
get { return GetBool("EnableThumbnails", false); }
|
||||
|
|
@ -410,6 +410,18 @@ namespace CatalogLib
|
|||
set { SetDouble("dimensioneFont", value); }
|
||||
}
|
||||
|
||||
public string TestoApplicareOrizzontale
|
||||
{
|
||||
get
|
||||
{
|
||||
return Get<string>("TestoApplicareOrizzontale", "");
|
||||
}
|
||||
set
|
||||
{
|
||||
Set<string>("TestoApplicareOrizzontale", value);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="ImageSharp" version="1.0.0-alpha3-00005" targetFramework="net46" />
|
||||
<package id="ImageSharp.Drawing" version="1.0.0-alpha3-00005" targetFramework="net46" />
|
||||
<package id="ImageSharp.Drawing.Paths" version="1.0.0-alpha2-00107" targetFramework="net46" />
|
||||
<package id="ImageSharp.Drawing.Text" version="1.0.0-alpha2-00003" targetFramework="net46" />
|
||||
<package id="ImageSharp" version="1.0.0-alpha4-00046" targetFramework="net46" />
|
||||
<package id="ImageSharp.Drawing" version="1.0.0-alpha4-00046" targetFramework="net46" />
|
||||
<package id="Microsoft.NETCore.Platforms" version="1.1.0" targetFramework="net46" />
|
||||
<package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="net46" />
|
||||
<package id="NETStandard.Library" version="1.6.1" targetFramework="net46" />
|
||||
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net46" />
|
||||
<package id="SixLabors.Fonts" version="0.1.0-alpha0002" targetFramework="net46" />
|
||||
<package id="SixLabors.Shapes" version="0.1.0-alpha0008" targetFramework="net46" />
|
||||
<package id="SixLabors.Shapes" version="0.1.0-alpha0009" targetFramework="net46" />
|
||||
<package id="System.AppContext" version="4.3.0" targetFramework="net46" />
|
||||
<package id="System.Buffers" version="4.3.0" targetFramework="net46" />
|
||||
<package id="System.Collections" version="4.3.0" targetFramework="net46" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue