Skip to content

Instantly share code, notes, and snippets.

@syun77
Created July 6, 2014 15:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save syun77/7b78f9e6341c51db6dd0 to your computer and use it in GitHub Desktop.
Save syun77/7b78f9e6341c51db6dd0 to your computer and use it in GitHub Desktop.
ImageMagickを使って「src」フォルダにあるPNGファイルをすべて結合
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import glob
dir = os.getcwd()
list = glob.glob(dir + '/src/*.png')
cmd = "/opt/local/bin/convert +append "
for fName in list:
cmd += fName + " "
cmd += dir + '/out.png'
os.system(cmd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment