c# - Convert browser blur pixel value to ImageProcessor Library GaussianBlur kernel equivalent -
im tring write image editor can edit image on client , make changes on server (lite version of paint). filtering, crop resize , ... problem: imagine choose 10px of blurness in editor, when pass value 10 factory.gaussianblur(value); invalid result. please let me know how can convert px value gaussianblur kernel value
the sample code is
private static bool blurfilter(string sourceimage, string destinationimage, int value = 100) { try { if (string.isnullorempty(destinationimage)) destinationimage = sourceimage; imagefactory factory = new imagefactory(); factory.load(sourceimage); factory.gaussianblur(value); factory.save(destinationimage); factory.image.dispose(); factory.dispose(); factory = null; return true; } catch (exception ex) { exceptionlogger.log(ex); return false; } }
Comments
Post a Comment