check_sanity: image dimensions must be positive