Added imagesharp
This commit is contained in:
parent
15f0d4d5b8
commit
6bb403e986
5 changed files with 76 additions and 1 deletions
|
|
@ -35,13 +35,38 @@
|
|||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ImageSharp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ImageSharp.1.0.0-alpha2-00115\lib\net45\ImageSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ImageSharp.Drawing, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ImageSharp.Drawing.1.0.0-alpha2-00115\lib\net45\ImageSharp.Drawing.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ImageSharp.Formats.Jpeg, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ImageSharp.Formats.Jpeg.1.0.0-alpha2-00115\lib\net45\ImageSharp.Formats.Jpeg.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ImageSharp.Formats.Png, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ImageSharp.Formats.Png.1.0.0-alpha2-00111\lib\net45\ImageSharp.Formats.Png.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ImageSharp.Processing, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ImageSharp.Processing.1.0.0-alpha2-00103\lib\net45\ImageSharp.Processing.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.0.0\lib\netstandard1.1\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.1.1\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.0.0\lib\netstandard1.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
|
|
@ -50,8 +75,10 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Class1.cs" />
|
||||
<Compile Include="IImageProcessor.cs" />
|
||||
<Compile Include="ImageCreator.cs" />
|
||||
<Compile Include="ImageCreator2.cs" />
|
||||
<Compile Include="ImgSharpCreator.cs" />
|
||||
<Compile Include="PicSettings.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="SinglePicData.cs" />
|
||||
|
|
|
|||
13
CatalogLib/IImageProcessor.cs
Normal file
13
CatalogLib/IImageProcessor.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CatalogLib
|
||||
{
|
||||
public interface IImageProcessor
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -10,7 +10,7 @@ using CatalogVbLib;
|
|||
|
||||
namespace CatalogLib
|
||||
{
|
||||
public class ImageCreator2
|
||||
public class ImageCreator2 : IImageProcessor
|
||||
{
|
||||
private PicSettings _picSettings = PicSettings.Instance;
|
||||
|
||||
|
|
|
|||
26
CatalogLib/ImgSharpCreator.cs
Normal file
26
CatalogLib/ImgSharpCreator.cs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ImageSharp;
|
||||
using ImageSharp.Formats;
|
||||
using ImageSharp.Processing.Processors;
|
||||
|
||||
namespace CatalogLib
|
||||
{
|
||||
public class ImgSharpCreator : IImageProcessor
|
||||
{
|
||||
public void Start(FileInfo workFile)
|
||||
{
|
||||
using (Image image = new Image(workFile.Name))
|
||||
{
|
||||
JpegDecoder j = new JpegDecoder();
|
||||
|
||||
image.Resize(200, 200).Save("");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="ImageSharp" version="1.0.0-alpha2-00115" targetFramework="net46" />
|
||||
<package id="ImageSharp.Drawing" version="1.0.0-alpha2-00115" targetFramework="net46" />
|
||||
<package id="ImageSharp.Formats.Jpeg" version="1.0.0-alpha2-00115" targetFramework="net46" />
|
||||
<package id="ImageSharp.Formats.Png" version="1.0.0-alpha2-00111" targetFramework="net46" />
|
||||
<package id="ImageSharp.Processing" version="1.0.0-alpha2-00103" targetFramework="net46" />
|
||||
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net46" />
|
||||
<package id="System.Buffers" version="4.0.0" targetFramework="net46" />
|
||||
<package id="System.Numerics.Vectors" version="4.1.1" targetFramework="net46" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="4.0.0" targetFramework="net46" />
|
||||
<package id="System.Threading.Tasks.Parallel" version="4.0.0" targetFramework="net46" />
|
||||
</packages>
|
||||
Loading…
Add table
Add a link
Reference in a new issue