class Vips::Argument::ArrayImageConst

@private

Public Class Methods

new(value) click to toggle source
# File lib/vips8/argument.rb, line 62
def self.new(value)
    if not value.is_a? Array
        value = [value]
    end

    match_image = value.find {|x| x.is_a? Vips::Image}
    if match_image == nil
        raise Vips::Error, 
            "Argument must contain at least one image."
    end

    value = value.map {|x| Argument::imageize match_image, x}

    # we'd like to just
    #   super(value)
    # to construct, but the gobject-introspection gem does not
    # support new from object array ... instead, we build in stages
    array = Vips::ArrayImage.empty
    value.each {|x| array = array.append(x)}

    return array
end