diff --git a/src/main.py b/src/main.py index 07238af..4dd899b 100644 --- a/src/main.py +++ b/src/main.py @@ -7,6 +7,7 @@ import argparse as ap import sys import json +from os.path import exists # Libraries for image processing import numpy as np @@ -59,7 +60,11 @@ class apply_filters: self.output_file = self.args.output_file self.dpi = self.args.dpi self.mirror = True if self.args.mirror else False - self.run() + if exists(self.input_file): + self.run() + else: + print("Input file does not exist", file=sys.stderr) + exit(1) def run(self): # read as numpy.array