Created
July 25, 2012 19:41
-
-
Save s4nchez/3178139 to your computer and use it in GitHub Desktop.
Merge all images in directory into one
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
brew install imagemagick | |
gem install rmagick |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'RMagick' | |
include Magick | |
image_files = [] | |
Dir.foreach(".") {|f| image_files << f} | |
image_files.delete(".") | |
image_files.delete("..") | |
images = ImageList.new(*image_files) | |
res = images.append(false) | |
res.write("all.png") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment