Skip to content

Instantly share code, notes, and snippets.

@dtan4
Created May 24, 2014 15:32
Show Gist options
  • Save dtan4/9aa4b91b7117283c9913 to your computer and use it in GitHub Desktop.
Save dtan4/9aa4b91b7117283c9913 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require "RMagick"
list = []
10.times do |i|
list << "lena_#{i}.png"
end
list.each_slice(5).inject(Magick::ImageList.new) do |image_list, row|
image_list << Magick::ImageList.new(*row).append(false)
image_list
end.append(true).write("lena_tile.png")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment