Aggiornate librerie, non funziona
This commit is contained in:
parent
4493648ea1
commit
da6b7abf8b
5 changed files with 39 additions and 17 deletions
|
|
@ -54,10 +54,10 @@
|
|||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ImageSharp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ImageSharp.1.0.0-alpha6-00049\lib\netstandard1.3\ImageSharp.dll</HintPath>
|
||||
<HintPath>..\packages\ImageSharp.1.0.0-alpha9-00140\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-alpha6-00010\lib\netstandard1.1\ImageSharp.Drawing.dll</HintPath>
|
||||
<HintPath>..\packages\ImageSharp.Drawing.1.0.0-alpha9-00135\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>
|
||||
|
|
@ -67,10 +67,13 @@
|
|||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="SixLabors.Fonts, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SixLabors.Fonts.0.1.0-alpha0008\lib\netstandard1.3\SixLabors.Fonts.dll</HintPath>
|
||||
<HintPath>..\packages\SixLabors.Fonts.0.1.0-alpha0011\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-alpha0011\lib\netstandard1.1\SixLabors.Shapes.dll</HintPath>
|
||||
<HintPath>..\packages\SixLabors.Shapes.0.1.0-alpha0017\lib\netstandard1.1\SixLabors.Shapes.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SixLabors.Shapes.Text, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SixLabors.Shapes.Text.0.1.0-alpha0017\lib\netstandard1.1\SixLabors.Shapes.Text.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.AppContext, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
|
|
@ -108,6 +111,9 @@
|
|||
<Reference Include="System.IO.FileSystem.Primitives, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.IO.FileSystem.Primitives.4.3.0\lib\net46\System.IO.FileSystem.Primitives.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Memory, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.4.0-preview1-25305-02\lib\netstandard1.0\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Net.Http.4.3.0\lib\net46\System.Net.Http.dll</HintPath>
|
||||
</Reference>
|
||||
|
|
@ -118,8 +124,8 @@
|
|||
<Reference Include="System.Numerics.Vectors, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.3.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.3.0\lib\netstandard1.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.4.0-preview1-25305-02\lib\netstandard1.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ using System.Numerics;
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ImageSharp;
|
||||
using ImageSharp.PixelFormats;
|
||||
using SixLabors.Fonts;
|
||||
using Color = ImageSharp.Color;
|
||||
using Font = SixLabors.Fonts.Font;
|
||||
using FontFamily = SixLabors.Fonts.FontFamily;
|
||||
using FontStyle = SixLabors.Fonts.FontStyle;
|
||||
|
|
@ -27,7 +27,7 @@ namespace CatalogLib
|
|||
|
||||
|
||||
|
||||
using (Image image = Image.Load(workFile.FullName)/* new Image(workFile.FullName)*/)
|
||||
using (Image<Rgba32> image = Image.Load(workFile.FullName)/* new Image(workFile.FullName)*/)
|
||||
{
|
||||
if (PicSettings.Instance.UsaRotazioneAutomatica)
|
||||
{
|
||||
|
|
@ -102,7 +102,7 @@ namespace CatalogLib
|
|||
|
||||
}
|
||||
|
||||
private void SetExtraText(Image image)
|
||||
private void SetExtraText(Image<Rgba32> image)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(PicSettings.Instance.TestoApplicareOrizzontale))
|
||||
{
|
||||
|
|
@ -116,16 +116,18 @@ namespace CatalogLib
|
|||
//var font = new Font(fff, 8f, FontStyle.Regular);
|
||||
|
||||
|
||||
Color c = Color.FromHex(FlipRgbString(PicSettings.Instance.ColoreTestoRGB));
|
||||
|
||||
//Color c = Color.FromHex(FlipRgbString(PicSettings.Instance.ColoreTestoRGB));
|
||||
Rgba32 g = Rgba32.FromHex(FlipRgbString(PicSettings.Instance.ColoreTestoRGB));
|
||||
TextMeasurer measurer = new TextMeasurer();
|
||||
|
||||
var size = measurer.MeasureText(PicSettings.Instance.TestoApplicareOrizzontale, font, 72);
|
||||
float scalingFactor = Math.Min(image.Width / size.Width, image.Height / size.Height);
|
||||
Font scaledFont = new Font(font, scalingFactor * font.Size);
|
||||
|
||||
image.DrawText("aaa", scaledFont, g, new Vector2(0, 0));
|
||||
|
||||
//image.DrawText(PicSettings.Instance.TestoApplicareOrizzontale, font, Color.Black, )
|
||||
image.DrawText(PicSettings.Instance.TestoApplicareOrizzontale, scaledFont, c, new Vector2(0, 0));
|
||||
//image.DrawText(PicSettings.Instance.TestoApplicareOrizzontale, scaledFont, c, new Vector2(0, 0));
|
||||
//image.DrawText("sssssssssssssssssssssssssssssssssssssssssssssss", font, Color.Black, new Vector2(200, 200));
|
||||
|
||||
//ahjsdfhjklasj
|
||||
|
|
|
|||
|
|
@ -26,6 +26,10 @@
|
|||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
|
|
@ -1,13 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="ImageSharp" version="1.0.0-alpha6-00049" targetFramework="net46" />
|
||||
<package id="ImageSharp.Drawing" version="1.0.0-alpha6-00010" targetFramework="net46" />
|
||||
<package id="ImageSharp" version="1.0.0-alpha9-00140" targetFramework="net46" />
|
||||
<package id="ImageSharp.Drawing" version="1.0.0-alpha9-00135" 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-alpha0008" targetFramework="net46" />
|
||||
<package id="SixLabors.Shapes" version="0.1.0-alpha0011" targetFramework="net46" />
|
||||
<package id="SixLabors.Fonts" version="0.1.0-alpha0011" targetFramework="net46" />
|
||||
<package id="SixLabors.Shapes" version="0.1.0-alpha0017" targetFramework="net46" />
|
||||
<package id="SixLabors.Shapes.Text" version="0.1.0-alpha0017" 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" />
|
||||
|
|
@ -27,6 +28,7 @@
|
|||
<package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="net46" />
|
||||
<package id="System.Linq" version="4.3.0" targetFramework="net46" />
|
||||
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="net46" />
|
||||
<package id="System.Memory" version="4.4.0-preview1-25305-02" targetFramework="net46" />
|
||||
<package id="System.Net.Http" version="4.3.0" targetFramework="net46" />
|
||||
<package id="System.Net.Primitives" version="4.3.0" targetFramework="net46" />
|
||||
<package id="System.Net.Sockets" version="4.3.0" targetFramework="net46" />
|
||||
|
|
@ -37,7 +39,7 @@
|
|||
<package id="System.Reflection.Primitives" version="4.3.0" targetFramework="net46" />
|
||||
<package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net46" />
|
||||
<package id="System.Runtime" version="4.3.0" targetFramework="net46" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="4.3.0" targetFramework="net46" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="4.4.0-preview1-25305-02" targetFramework="net46" />
|
||||
<package id="System.Runtime.Extensions" version="4.3.0" targetFramework="net46" />
|
||||
<package id="System.Runtime.Handles" version="4.3.0" targetFramework="net46" />
|
||||
<package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net46" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue