checking condition is wrong (#3025)

* checking condition is wrong

* remove unnecessary check
This commit is contained in:
Xiang Zhang 2020-02-19 13:29:42 -08:00 committed by GitHub
parent e3c27536d0
commit 18aa0940c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -152,13 +152,6 @@ BitmapBounds ImageFeatureValue::CenterAndCropBounds(
bounds.Y = (m_heights[idx] - bounds.Height) / 2;
}
// TODO: Do we allow smaller images?
WINML_THROW_HR_IF_FALSE_MSG(
WINML_ERR_INVALID_BINDING,
(bounds.X >= 0 && bounds.X <= m_widths[idx]) &&
(bounds.Y >= 0 && bounds.Y <= m_heights[idx]),
"Failed to center crop the provided input image. The calculated bounds exceed the dimensions of the image, or do not match the model inputs dimensions.");
return bounds;
}