diff --git a/dedup.py b/dedup.py index 87b5b6a..c71f196 100644 --- a/dedup.py +++ b/dedup.py @@ -370,7 +370,7 @@ def get_image_dimensions_cv(img): if img is not None: height, width = img.shape[:2] return width, height - return None + return None, None """ xxhash is about 5–10x faster than SHA256, non-cryptographic. @@ -414,6 +414,10 @@ if __name__ == "__main__": w, h = get_image_dimensions_cv(large_img1) w2, h2 = get_image_dimensions_cv(large_img2) + if w == None or w2 == None or h == None or h2 == None: + print("Aborting...Invalid Image!") + timer() + exit(8) if w != w2 and w != h2: print("Diffent Resolutions") timer() diff --git a/junk.jpg b/junk.jpg new file mode 100644 index 0000000..ab207bc --- /dev/null +++ b/junk.jpg @@ -0,0 +1 @@ +njxczsfjsdfjhklfdsklfsdfklsdlfjkdsljfldsfklsdaf