Created
June 25, 2016 09:43
-
-
Save bastengao/4c56a61bd529c19a79dbc6fbba4509e6 to your computer and use it in GitHub Desktop.
Imagemagic append images vertically or horizontally.
This file contains hidden or 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
# http://www.imagemagick.org/script/command-line-options.php#append | |
# append two images vertically | |
# conver -append first.png second.png result.png | |
MiniMagick::Tool::Convert.new do |convert| | |
convert.append.- | |
convert << "first.png" | |
convert << "second.png" | |
convert << "result.png" | |
end | |
# append two images horizontally | |
# conver +append first.png second.png result.png | |
MiniMagick::Tool::Convert.new do |convert| | |
convert.append.+ | |
convert << "first.png" | |
convert << "second.png" | |
convert << "result.png" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment