imagesharp - ImageSharp 1.0.0-alpha9-00194

A cross-platform library for the processing of image files; written in C#

PM> Install-Package ImageSharp -Version 1.0.0-alpha9-00194 -Source https://www.myget.org/F/imagesharp/api/v3/index.json

Copy to clipboard

> nuget.exe install ImageSharp -Version 1.0.0-alpha9-00194 -Source https://www.myget.org/F/imagesharp/api/v3/index.json

Copy to clipboard

> dotnet add package ImageSharp --version 1.0.0-alpha9-00194 --source https://www.myget.org/F/imagesharp/api/v3/index.json

Copy to clipboard
<PackageReference Include="ImageSharp" Version="1.0.0-alpha9-00194" />
Copy to clipboard
source https://www.myget.org/F/imagesharp/api/v3/index.json

nuget ImageSharp  ~> 1.0.0-alpha9-00194
Copy to clipboard

> choco install ImageSharp --version 1.0.0-alpha9-00194 --source https://www.myget.org/F/imagesharp/api/v2

Copy to clipboard
Import-Module PowerShellGet
Register-PSRepository -Name "imagesharp" -SourceLocation "https://www.myget.org/F/imagesharp/api/v2"
Install-Module -Name "ImageSharp" -RequiredVersion "1.0.0-alpha9-00194" -Repository "imagesharp" -AllowPreRelease
Copy to clipboard

ImageSharp
ImageSharp

GitHub license Gitter Twitter OpenCollective OpenCollective

Without the use of System.Drawing we have been able to develop something much more flexible, easier to code against, and much, much less prone to memory leaks. Gone are system-wide process-locks; ImageSharp images are thread-safe and fully supported in web environments.

Built against .Net Standard 1.1 ImageSharp can be used in device, cloud, and embedded/IoT scenarios.

Questions?

Do you have questions? We are happy to help! Please join our gitter channel, or ask them on stackoverflow using the ImageSharp tag.

Installation

Package Name Release (NuGet) Nightly (MyGet)
SixLabors.ImageSharp NuGet MyGet
SixLabors.ImageSharp.Drawing NuGet MyGet

Packages

The ImageSharp library is made up of multiple packages:

  • SixLabors.ImageSharp

    • Contains the generic Image<TPixel> class, PixelFormats, Primitives, Configuration, and other core functionality.
    • The IImageFormat interface, Jpeg, Png, Bmp, and Gif formats.
    • Transform methods like Resize, Crop, Skew, Rotate - Anything that alters the dimensions of the image.
    • Non-transform methods like Gaussian Blur, Pixelate, Edge Detection - Anything that maintains the original image dimensions.
  • SixLabors.ImageSharp.Drawing

    • Brushes and various drawing algorithms, including drawing images.
    • Various vector drawing methods for drawing paths, polygons etc.
    • Text drawing.

Build Status

Build Status Code Coverage
Linux/Mac Build Status Code coverage
Windows Build Status Code coverage

Features

There's plenty there and more coming. Check out the current features!

API

Here's an example of the code required to resize an image using the default Bicubic resampler then turn the colors into their grayscale equivalent using the BT709 standard matrix.

On platforms supporting netstandard 1.3+

// Image.Load(string path) is a shortcut for our default type. Other pixel formats use Image.Load<TPixel>(string path))
using (Image<Rgba32> image = Image.Load("foo.jpg"))
{
    image.Mutate(x => x
         .Resize(image.Width / 2, image.Height / 2)
         .Grayscale());
    image.Save("bar.jpg"); // automatic encoder selected based on extension.
}

on netstandard 1.1 - 1.2

// Image.Load(Stream stream) is a shortcut for our default type. Other pixel formats use Image.Load<TPixel>(Stream stream))
using (FileStream stream = File.OpenRead("foo.jpg"))
using (FileStream output = File.OpenWrite("bar.jpg"))
using (Image<Rgba32> image = Image.Load<Rgba32>(stream))
{
    image.Mutate(x => x
         .Resize(image.Width / 2, image.Height / 2)
         .Grayscale());
    image.Save(output);
}

Setting individual pixel values can be perfomed as follows:

// Individual pixels
using (Image<Rgba32> image = new Image<Rgba32>(400, 400))
{
    image[200, 200] = Rgba32.White;
}

Rgba32 is our default PixelFormat, equivalent to System.Drawing Color. For advanced pixel format usage there are multiple PixelFormat implementations available allowing developers to implement their own color models in the same manner as Microsoft XNA Game Studio and MonoGame.

All in all this should allow image processing to be much more accessible to developers which has always been my goal from the start.

Check out this blog post or our Samples Repository for more examples!

Manual build

If you prefer, you can compile ImageSharp yourself (please do and help!), you'll need:

Alternatively on Linux you can use:

To clone it locally click the "Clone in Windows" button above or run the following git commands.

git clone https://github.com/SixLabors/ImageSharp

How can you help?

Please... Spread the word, contribute algorithms, submit performance improvements, unit tests, no input is too little.

The ImageSharp Team

Grand High Eternal Dictator

Core Team

Backers

Support us with a monthly donation and help us continue our activities. [Become a backer]

Sponsors

Become a sponsor and get your logo on our README on Github with a link to your site. [Become a sponsor]

  • .NETStandard 1.1
    • NETStandard.Library (>= 1.6.1)
    • SixLabors.Core (>= 0.1.0-alpha0002)
    • System.Buffers (>= 4.4.0)
    • System.IO.Compression (>= 4.3.0)
    • System.Memory (>= 4.4.0-preview2-25405-01)
    • System.Numerics.Vectors (>= 4.4.0)
    • System.Runtime.CompilerServices.Unsafe (>= 4.4.0)
    • System.Threading.Tasks.Parallel (>= 4.3.0)
    • System.ValueTuple (>= 4.4.0)
  • .NETStandard 1.3
    • NETStandard.Library (>= 1.6.1)
    • SixLabors.Core (>= 0.1.0-alpha0002)
    • System.Buffers (>= 4.4.0)
    • System.IO.Compression (>= 4.3.0)
    • System.Memory (>= 4.4.0-preview2-25405-01)
    • System.Numerics.Vectors (>= 4.4.0)
    • System.Runtime.CompilerServices.Unsafe (>= 4.4.0)
    • System.Threading.Tasks.Parallel (>= 4.3.0)
    • System.ValueTuple (>= 4.4.0)
  • .NETStandard 1.1: 1.1.0.0
  • .NETStandard 1.3: 1.3.0.0

Owners

Scott Williams James Jackson-South

Authors

James Jackson-South and contributors

Project URL

https://github.com/JimBobSquarePants/ImageSharp

License

Apache-2.0

Tags

Image Resize Crop Gif Jpg Jpeg Bitmap Png Core

Info

3670 total downloads
295 downloads for version 1.0.0-alpha9-00194
Package size 692.12 KB
Download
Found on the current feed only

Package history

Version Size Last updated Downloads Mirrored?
1.0.0-alpha9-00194 692.12 KB Sat, 02 Sep 2017 09:44:48 GMT 295
1.0.0-alpha9-00193 692.11 KB Fri, 01 Sep 2017 22:43:43 GMT 7
1.0.0-alpha9-00191 692.11 KB Fri, 01 Sep 2017 21:30:54 GMT 3
1.0.0-alpha9-00187 692.11 KB Mon, 28 Aug 2017 21:56:43 GMT 11
1.0.0-alpha9-00182 691.27 KB Sun, 13 Aug 2017 09:15:52 GMT 436
1.0.0-alpha9-00181 691.17 KB Sat, 12 Aug 2017 11:54:17 GMT 6
1.0.0-alpha9-00179 691.21 KB Sat, 12 Aug 2017 10:06:27 GMT 4
1.0.0-alpha9-00178 691.21 KB Sat, 12 Aug 2017 09:53:51 GMT 2
1.0.0-alpha9-00176 691.11 KB Tue, 08 Aug 2017 06:35:31 GMT 115
1.0.0-alpha9-00175 691.12 KB Sun, 30 Jul 2017 08:21:56 GMT 1197
1.0.0-alpha9-00173 691.15 KB Tue, 18 Jul 2017 19:55:16 GMT 141
1.0.0-alpha9-00171 691.13 KB Mon, 17 Jul 2017 00:33:27 GMT 77
1.0.0-alpha9-00170 691.1 KB Wed, 05 Jul 2017 23:54:45 GMT 31
1.0.0-alpha9-00169 691.11 KB Sat, 01 Jul 2017 13:28:49 GMT 171
1.0.0-alpha9-00154 688.52 KB Fri, 30 Jun 2017 06:55:05 GMT 15
1.0.0-alpha9-00152 688.07 KB Mon, 26 Jun 2017 07:03:02 GMT 52
1.0.0-alpha9-00148 705 KB Fri, 23 Jun 2017 15:16:30 GMT 20
1.0.0-alpha9-00146 705.06 KB Wed, 21 Jun 2017 08:50:44 GMT 6
1.0.0-alpha9-00141 701.21 KB Tue, 20 Jun 2017 21:05:08 GMT 8
1.0.0-alpha9-00140 701.21 KB Thu, 15 Jun 2017 01:54:12 GMT 1073