Last active
November 26, 2016 05:24
-
-
Save axtutuu/7f8563b115a5d2e40f946c4ee27e8c83 to your computer and use it in GitHub Desktop.
画像、合成テスト
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
gems/ |
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" | |
require "pry" | |
base_path = "./4x4.png" | |
image_path = "./1x1.png" | |
base = Magick::ImageList.new base_path | |
image = Magick::ImageList.new image_path | |
# result_x = 2 | |
# result_y = 2 | |
result2_x = 2.5 | |
result2_y = 2.5 | |
result = base.composite(image, result2_x, result2_y, Magick::OverCompositeOp) | |
result.write("./result2.png") |
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
# frozen_string_literal: true | |
source "https://rubygems.org" | |
gem "rmagick" | |
gem "pry" | |
# gem "rails" |
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
GEM | |
remote: https://rubygems.org/ | |
specs: | |
coderay (1.1.1) | |
method_source (0.8.2) | |
pry (0.10.4) | |
coderay (~> 1.1.0) | |
method_source (~> 0.8.1) | |
slop (~> 3.4) | |
rmagick (2.16.0) | |
slop (3.6.0) | |
PLATFORMS | |
ruby | |
DEPENDENCIES | |
pry | |
rmagick | |
BUNDLED WITH | |
1.13.2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment