|
|
|
|
@ -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() |
|
|
|
|
|