Added imagesharp
This commit is contained in:
parent
15f0d4d5b8
commit
6bb403e986
5 changed files with 76 additions and 1 deletions
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("");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue