Note: This project is still in its infancy
A fluent imgix link builder library. Imgix is a hosted real time image processing service.
- Fluent interface
- Easily extensible
- Sharded sources
- Full support for request signing
- Flexible configuration options
Make sure you have an account set up at imgix Next install the package with the following command
PM> Install-Package Imgix-Dotnet
Once you have installed the package to your project, you can get started creating image links.
/* https://assets.imgix.net/blog/woman-hat.jpg?w=200&h=200&mask=ellipse&fit=crop&crop=faces&fm=png */
var result = Imgix.CreateImage("blog/woman-hat.jpg", "assets")
.Width(200)
.Height(200)
.EllipseMask()
.Fit("crop")
.Crop("faces")
.AddParameter("fm", "png") //If there is no method for an operation just add a manual parameter.
Example image from the imgix sandbox
The ImgixImage class is immutable so it is always a new image that is returned. This means that you can use the same image to create multiple resulting images, without worrying about shared state.
Multiple different formats are quickly created in a very dry way.
//Setting up the base shape and format of the image
var baseImage = Imgix.CreateImage("blog/woman-hat.jpg", "assets")
.Fit("crop")
.Crop("faces")
.AddParameter("faceindex", "1");
//Creating multiple sizes
var image400x200 = baseImage.Width(400).Height(200);
var image200x400 = baseImage.Width(200).Height(400);
Example image from the imgix sandbox
- 2015-12-02 - Version 0.0.1 Released on nuget