The two image files being compared should ideally be the same height if everything has gone well. If there's a huge mismatch between the size of the files the compare takes far too long and certainly isn't economical use of checking time.
If the height difference of the compare files are off by more than a threshold amount, skip doing the comparison and flag that somehow with a message in the image and the text status file.