问题
I am using ImageBuilder.Current.Build(imageStream, new ResizeSettings("width=100&height=200&crop=auto&s.grayscale=true")) in a console application, but only width and height attributes are applied, the s.grayscale parameter is ignored. I have installed the SimpleFilters plugin from nuget, and I have added it in the plugin section in app.config. Any idea what I could be missing?
回答1:
.NET 4.0 doesn't load .dlls unless there is a static code reference.
Use the code installation method during startup instead of XML:
new SimpleFilters().Install(Config.Current).
来源:https://stackoverflow.com/questions/17045147/only-basic-parameters-are-honoured-in-imageresizer-console-app