Created
March 4, 2016 09:22
-
-
Save kyontan/c2d049e52f82e08b3b08 to your computer and use it in GitHub Desktop.
画像に隙間を作るやつ
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
def get_dim(f) | |
return 2 if f.include?(?2) | |
return 3 if f.include?(?3) | |
return 1 | |
end | |
def gravity(g) | |
return "west" if g == "l" | |
return "east" | |
end | |
def make_cmd(file, size, g) | |
"convert -resize 100% -gravity #{gravity(g)} -background transparent -splice #{size*get_dim(file)}x0 #{file} converted/#{file}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment