Method: Vips::Image#-

Defined in:
lib/vips8/image.rb

#-(other) ⇒ Image

Subtract an image, constant or array.

Parameters:

  • other (Image, Real, Array<Real>)

    Thing to subtract from self

Returns:

  • (Image)

    result of subtraction

[View source]

737
738
739
740
# File 'lib/vips8/image.rb', line 737

def -(other)
    other.is_a?(Vips::Image) ? 
        subtract(other) : linear(1, Image::smap(other) {|x| x * -1})
end