Only basic parameters are honoured in ImageResizer console app

夙愿已清 提交于 2019-11-27 08:30:24

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!