Stitch Images in Python with Tkinter
Your script wants to save your file to a directory but the file name/extension is not specified. You should pass the path of file in new_im.save()
(Not only directory's path).
Correct line:
new_im.save("{}".format(os.path.join(new_dir, "new_img.jpg")))