Skip to content

vips_gaussblur call with small values for sigma is causing unexpected results #1793

@johntrunc

Description

@johntrunc

Hi, not sure if this is a bug or not.

I'm executing calls to vips_gaussblurwith a value of 0.5 and I'm receiving a black image after use vips_jpegsave_buffer for some reason. I'm doing the following:

vips_gaussblur(in, out, 0.5, "precision", VIPS_PRECISION_APPROXIMATE, NULL);

In the documentation that is showed calling vips gaussblur I can see that the minimum value is 0,01:

   sigma        - Sigma of Gaussian, input gdouble
			default: 1,5
			min: 0,01, max: 1000

When I'm using a value of 0.01 as sigma I'm getting even more strange results with this warning:

GLib-GObject-WARNING **: 15:12:41.923: value "-1" of type 'gint' is invalid or out of range for property 'width' of type 'gint'

Using a value of 0.6 is making everything works as expected.

What should be the minimum and maximum values for the sigma value?

There is some different between calling vips_gaussblur from C and using the vips gaussblur command line?

I'm using vips-8.9.2 on MacOS 10.14.6 with the following image:

fly

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions