Class: CatMap::Transform

Inherits:
Thor
  • Object
show all
Defined in:
lib/cat_map.rb

Instance Method Summary collapse

Instance Method Details

#transform(image_file) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/cat_map.rb', line 9

def transform(image_file)
  new_image = ChunkyPNG::Image.from_file(image_file)
  (1..options[:iterations].to_i).each do |iteration|
    new_image = cat_map(new_image)
    puts "creating #{file_name(iteration)}."
    new_image.save(file_name(iteration))
  end
end