Method: Vips::Image#getpoint

Defined in:
lib/vips8/image.rb,
lib/vips8/methods.rb

#getpoint(x, y, opts = {}) ⇒ Array<Double>

Read a point from an image.

Parameters:

  • x (Integer)

    Point to read

  • y (Integer)

    Point to read

  • opts (Hash) (defaults to: {})

    Set of options

Returns:

  • (Array<Double>)

    Array of output values


1018
1019
1020
1021
1022
1023
1024
1025
# File 'lib/vips8/image.rb', line 1018

def getpoint(x, y)
    # vips has an operation that does this, but we can't call it via
    # gobject-introspection 3.0.7 since it's missing array double
    # get
    #
    # remove this def when gobject-introspection updates
    crop(x, y, 1, 1).bandsplit.map {|i| i.avg}
end