Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
helioloureiro committed Nov 27, 2024
1 parent 7521c21 commit db17488
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resize-images.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
default_size_y = 360

parse = argparse.ArgumentParser(description="Script to resize pictures from a specific directory to the same size")
parse.add_argument("--directory", mandatory=True, help="directory with images jpg")
parse.add_argument("--directory", required=True, help="directory with images jpg")
args = parse.parse_args()

for filename in sorted(os.listdir(args.directory)):
if not re.search("jpg", filename):
continue
with Image.open("../" + filename) as image:
with Image.open(args.directory + "/" + filename) as image:
width, height = image.size
rate = float(width)/float(height)
is_golden = rate == golden_rate
Expand Down

0 comments on commit db17488

Please sign in to comment.