0

im tring to write a image editor which you can edit the image on the client and make the changes on the server (lite version of paint). it does filtering, crop resize and ... problem: imagine i choose 10px of blurness in my editor, when i pass the value 10 to factory.GaussianBlur(value); i get the invalid result. please let me know how can i convert px value to 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;
        }
    }
  • _problem: imagine i choose 10px of blurness in my editor, when i pass the value 10 to factory.GaussianBlur(value); i get the invalid result. please let me know how can i convert px value to GaussianBlur kernel value_ What do you mean by this, is there an error thrown? 10 should be a valid value as demonstrated in the documentation. http://imageprocessor.org/imageprocessor/imagefactory/gaussianblur/ – James South Jun 01 '16 at 06:04
  • its not the answer!!!! i knew where the documentation is. only if you read the question it would be fine :D – Navid Kianfar Jul 03 '16 at 07:29
  • I need you to answer my question please. What error is thrown. 10 is a valid value. – James South Jul 03 '16 at 23:52

0 Answers0