Module: Vips::Process::GaussianBlur

Defined in:
lib/vips-process/gaussian-blur.rb

Constant Summary collapse

NORMALISE_TO =

We normalise to 20 so that the mask sum stays under 255 for most blurs. This will let Vips use its fast SSE path for 8-bit images

20.0
BIGGEST_MASK =

The size of the biggest mask we support

10000

Instance Method Summary collapse

Instance Method Details

#gaussian_blur(sigma, min_ampl = 0.2) ⇒ Object

Apply gaussian blur to an image.

Parameters:

  • sigma

    Float roughly the radius

  • min_ampl (defaults to: 0.2)

    Float minimium amplitude we consider, it sets how far out the mask goes



17
18
19
20
21
22
# File 'lib/vips-process/gaussian-blur.rb', line 17

def gaussian_blur(sigma, min_ampl=0.2)
  manipulate! do |image|
    image.convsep gaussian_mask(sigma, min_ampl)
  end
  self
end