CHANGED:applied the getRequiredCertPhotoWidth/Height function