diff --git a/argparams.py b/argparams.py index 14f014a..b262ce5 100644 --- a/argparams.py +++ b/argparams.py @@ -85,19 +85,19 @@ def parse_args(): def verify_args(args): # Informational logs - logging.info(f"Interval function: {args['interval_function']}") + logging.info("Interval function: {args['interval_function']}") if args["interval_function"] in ["threshold", "edges", "file-edges"]: - logging.info(f"Lower threshold: {args['bottom_threshold']}") + logging.info("Lower threshold: {args['bottom_threshold']}") if args["interval_function"] == "threshold": - logging.info(f"Upper threshold: {args['upper_threshold']}") + logging.info("Upper threshold: {args['upper_threshold']}") if args["interval_function"] in ["random", "waves"]: - logging.info(f"Characteristic length: {args['clength']}") - logging.info(f"Randomness: {args['randomness']}%") + logging.info("Characteristic length: {args['clength']}") + logging.info("Randomness: {args['randomness']}%") # Actual validation if not args["output_image_path"]: - output = f"{util.id_generator()}.png" + output = "{util.id_generator()}.png" logging.warning( - f"No output path provided, defaulting to {output}") + "No output path provided, defaulting to {output}") args["output_image_path"] = output args["interval_function"] = read_interval_function( args["interval_function"]) diff --git a/pixelsort.py b/pixelsort.py index 6c403ef..162f015 100644 --- a/pixelsort.py +++ b/pixelsort.py @@ -25,8 +25,7 @@ def main(args): data = input_img.load() logging.debug("Loading mask...") - mask = Image.open(args["mask"]).convert( - 'RGBA').load() if args["mask"] else None + mask = Image.open(args["mask"]).convert('RGBA').rotate(args["angle"], expand=True).load() if args["mask"] else None logging.debug("Getting pixels...") pixels = get_pixels(data, mask, input_img.size)