aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclarkzjw <[email protected]>2023-02-07 16:25:10 -0800
committerclarkzjw <[email protected]>2023-02-07 16:25:10 -0800
commit5ec22acf45f812bfdfe844d90764a62c94d47313 (patch)
tree53e91d4c9dad23da2bcefc694e239456bb771540
parent813834094d0cc8b476760be55e3db425416c0f63 (diff)
downloadSquare-5ec22acf45f812bfdfe844d90764a62c94d47313.tar.gz
remove padding
-rwxr-xr-xsquare.py10
1 files changed, 1 insertions, 9 deletions
diff --git a/square.py b/square.py
index 6cf3b48..9e01138 100755
--- a/square.py
+++ b/square.py
@@ -65,11 +65,6 @@ def drop_shadow(image, offset=(5, 5), background=0xffffff, shadow=0x444444, bord
65 65
66 66
67if __name__ == "__main__": 67if __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)
Powered by cgit v1.2.3 (git 2.41.0)