Method: Vips::Image#get_value

Defined in:
lib/vips8/image.rb

#get_value(name) ⇒ Object

Get a metadata item from an image. Ruby types are constructed automatically from the GValue, if possible.

For example, you can read the ICC profile from an image like this:

profile = image.get_value "icc-profile-data"

and profile will be an array containing the profile.

Parameters:

  • name (String)

    Metadata field to set

Returns:

  • (Object)

    Value of field

See Also:

[View source]

676
677
678
679
680
681
682
683
684
# File 'lib/vips8/image.rb', line 676

def get_value(name)
    ret, gval = get name
    if ret[0] != 0
        raise Vips::Error, "Field #{name} not found."
    end
    value = gval.value

    Argument::unwrap(value)
end