Class: Pixelart::ImageComposite

Inherits:
Object
  • Object
show all
Defined in:
lib/artbase/image.rb

Instance Method Summary collapse

Instance Method Details

#add_glob(glob) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/artbase/image.rb', line 8

def add_glob( glob )
  files = Dir.glob( glob )
  puts "#{files.size} file(s) found matching >#{glob}<"


  files = files.sort
  ## puts files.inspect

  files.each_with_index do |file,i|
    puts "==> [#{i+1}/#{files.size}] - #{file}"
    img = Image.read( file )

    self << img    ## todo/check: use add alias - why? why not?
  end
end