Skip to content

Commit

Permalink
black: fixed issues
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertHue committed Aug 20, 2024
1 parent f80074a commit 788fe2f
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions helpers/crop_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,23 @@ def crop_images(self):

print(f"Cropped and saved: {filename}")


def main():
parser = argparse.ArgumentParser(description="Crop images in a directory and save them in a 'cropped' subdirectory.")
parser.add_argument("input_dir", type=str, help="Path to the input directory containing images.")
parser.add_argument("--crop_box", type=int, nargs=4, default=[100, 100, 400, 400],
help="Properties for the crop box (x, y, width, height).")
parser = argparse.ArgumentParser(
description="Crop images in a directory and save them in a 'cropped' subdirectory."
)
parser.add_argument(
"input_dir",
type=str,
help="Path to the input directory containing images.",
)
parser.add_argument(
"--crop_box",
type=int,
nargs=4,
default=[100, 100, 400, 400],
help="Properties for the crop box (x, y, width, height).",
)

args = parser.parse_args()

Expand All @@ -53,5 +65,6 @@ def main():
print(f"{cropper.output_dir=}")
print(f"{cropper.crop_box=}")


if __name__ == "__main__":
main()

0 comments on commit 788fe2f

Please sign in to comment.