This release of the library introduces alternative multi-threaded optimized filters beside the medium-trust compatible filters already included in the library. If you're using the library in a full-trust environment such as a WinForm application you should definitely use the faster filters as they are much faster, depending on the CPU reducing the time taken with 80% or more (numbers based on an Intel Core i7-2600K).
Add the NuGet-package ImageLibrary.FastFilters to your project and use the filters prefixed with Fast (for instance FastUnsharpMask
instead of UnsharpMask
).
using Kaliko.ImageLibrary; using Kaliko.ImageLibrary.Filters; using Kaliko.ImageLibrary.FastFilters; // ... var testImage = new KalikoImage("originalimage.png"); var filter = new FastUnsharpMaskFilter(5, 1.7f, 3); testImage.ApplyFilter(filter); testImage.SaveJpg("outputimage.jpg", 90);