mishap
mishap

Reputation: 8505

Using asp.net ImageResizer api

I'm using ImageResizer (imageresizing.net) and I'm able to create resized images:

public void DoMagic(string original)
{
    string newImage = Server.MapPath("~/Images/test.png");
    ResizeSettings setting = new ResizeSettings("width=100&height=200");
    ImageBuilder.Current.Build(original, newImage,  setting);
}

I cannot figure out how to use grayscale or brightness:

s.grayscale=true|y|ry|ntsc|bt709|flat (true, ntsc, and y produce identical results)

s.brightness= -1..1

Upvotes: 3

Views: 1223

Answers (1)

mishap
mishap

Reputation: 8505

I just forgot to install the SimpleFilters plugin. After that just followed this and then this

ImageBuilder.Current.Build(original, newImage, new ResizeSettings("width=100&height=200&crop=auto&s.grayscale=true"));

Upvotes: 2

Related Questions