Skip to content

estei/Imgix-Dotnet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Imgix-Dotnet

Note: This project is still in its infancy

Build status

A fluent imgix link builder library. Imgix is a hosted real time image processing service.

Features

  • Fluent interface
  • Easily extensible
  • Sharded sources
  • Full support for request signing
  • Flexible configuration options

Getting started

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

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 400x200px Example 200x400px

Example image from the imgix sandbox

Changes

  • 2015-12-02 - Version 0.0.1 Released on nuget

About

A fluent Imgix.com link builder.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages