BUG - RasterImage.Filter GaussianFilterOptions Black pixel and border creation

Hello, we have encountered a problem while applying the Gaussian Filter on raster Images.

The usage (c#):
image.Filter(image.bounds,new GaussianFilter(1,0.255));

The result is the same image with black pixel at index [0,0].
The problem then continues as the filter is being applied on the following pixels, creating a border to the image.

The best way to recreate the problem and understand it, is to apply the filter as the following:

image.Filter(image.bounds,new GaussianFilter(5,5));

That way you can actually see the border clearly and the black pixel on top.
Try for example to apply the filter on a white image.

This occures on different versions of Aspose.Imaging (checked against 21, 20 and more)

Thank you.

@OmerG

Can you please share the working sample code, source file, output achieved and desired output file with us. We will investigate the issue further on our end to help you out.

Hi,

I’ve added three sample images:

  1. test_image.jpg - the original image
  2. test_image_1_0.225.jpg - the achieved image after applying a gaussian filter with (1, 0.225)
  3. test_image_5_5.jpg - the achieved image after applying a gaussian filter with (5, 5)

Also, a sample code is provided below:

public static void GenerateImage(string inputPath, string outputPath)
{
    using (Image image = Image.Load(inputPath))
    {
        using (var raster = (RasterImage)image)
        {
            raster.Filter(image.Bounds, new GaussianBlurFilterOptions(1, 0.225));
            raster.Save(outputPath);
        }
    }
}

As I’ve mentioned before, there is a black pixel at index [0,0] (top, left) in all cases, which probably causes this bug.
We believe that using the original pixel at index [0,0] instead of the black one, will resolve this issue and provide the desired result.

Thanks!test_image.jpg (1.1 KB)
test_image_1_0.225.jpg (1.2 KB)
test_image_5_5.jpg (1.7 KB)

@OmerG

I have created a ticket with ID IMAGINGNET-4588 in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

The issues you have found earlier (filed as IMAGINGNET-4588) have been fixed in this update.