Created
November 11, 2018 17:43
-
-
Save krared/44bf366b5c3ef76795a1fbcd47a51fc5 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
import os | |
from multiprocessing import Pool | |
import glob | |
def mk_3_rotate(filename): | |
os.system("convert -rotate 90 {0} 90_{0}".format(filename[1])) | |
os.system("convert -rotate 180 {0} 180_{0}".format(filename[1])) | |
os.system("convert -rotate 270 {0} 270_{0}".format(filename[1])) | |
if __name__ == '__main__': | |
# folder = os.getcwd() | |
images = glob.glob('*.JPG') | |
img_c = list(enumerate(images, 0)) | |
pool = Pool() | |
pool.map(mk_3_rotate, img_c) | |
pool.close() | |
pool.join() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment