diff options
-rwxr-xr-x | square.py | 10 |
1 files changed, 1 insertions, 9 deletions
@@ -65,11 +65,6 @@ def drop_shadow(image, offset=(5, 5), background=0xffffff, shadow=0x444444, bord | |||
65 | 65 | ||
66 | 66 | ||
67 | if __name__ == "__main__": | 67 | if __name__ == "__main__": |
68 | parser = argparse.ArgumentParser(description="Options") | ||
69 | parser.add_argument('--padding', action=argparse.BooleanOptionalAction) | ||
70 | |||
71 | args = parser.parse_args() | ||
72 | |||
73 | files = glob.glob("*") | 68 | files = glob.glob("*") |
74 | for file in files: | 69 | for file in files: |
75 | if (file.endswith(".jpg") or file.endswith(".png")) \ | 70 | if (file.endswith(".jpg") or file.endswith(".png")) \ |
@@ -85,8 +80,5 @@ if __name__ == "__main__": | |||
85 | continue | 80 | continue |
86 | 81 | ||
87 | print("Processing {}".format(file)) | 82 | print("Processing {}".format(file)) |
88 | if args.padding is True: | 83 | result = square_size_padding(im) |
89 | result = square_size_padding(drop_shadow(im, background=0xFAFAFA, shadow=0x444444, offset=(20, 20))) | ||
90 | else: | ||
91 | result = square_size_no_padding(drop_shadow(im, background=0xFAFAFA, shadow=0x444444, offset=(20, 20))) | ||
92 | result.save("{}-result.{}".format(names[0], names[1]), quality=100) | 84 | result.save("{}-result.{}".format(names[0], names[1]), quality=100) |