mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
Merge branch 4.x
This commit is contained in:
@@ -1285,6 +1285,17 @@ TEST(Imgcodecs_Tiff, read_bigtiff_images)
|
||||
}
|
||||
}
|
||||
|
||||
TEST(Imgcodecs_Tiff, read_junk) {
|
||||
// Test exercises the tiff error handler integration.
|
||||
// Error messages can be seen with OPENCV_LOG_LEVEL=DEBUG
|
||||
const char junk[] = "II\x2a\x00\x08\x00\x00\x00\x00\x00\x00\x00";
|
||||
cv::Mat junkInputArray(1, sizeof(junk) - 1, CV_8UC1, (void*)junk);
|
||||
|
||||
cv::Mat img;
|
||||
ASSERT_NO_THROW(img = cv::imdecode(junkInputArray, IMREAD_UNCHANGED));
|
||||
ASSERT_TRUE(img.empty());
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
}} // namespace
|
||||
|
||||
Reference in New Issue
Block a user