Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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
like image 899
mishap Avatar asked Jul 10 '26 09:07

mishap


1 Answers

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"));
like image 179
mishap Avatar answered Jul 12 '26 04:07

mishap



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!