Created
July 7, 2018 01:15
-
-
Save yammik/6fbaa7bbfaf1a500f2c3b7230d345255 to your computer and use it in GitHub Desktop.
script to split multipage TIFF for TFM
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
import os | |
import subprocess | |
path = raw_input("path : ") + "/" | |
for filename in os.listdir(path): | |
if (filename.endswith('.tif')): | |
print(filename) | |
cmd = "/usr/local/bin/convert -quiet -scene 1 " + path + filename + " " + path + filename + "-%d.tif" | |
subprocess.call(cmd, shell=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment