Exit with with 1 if images have different size.