@@ -7,12 +7,6 @@ namespace opencv_test { namespace {
7
7
8
8
#ifdef HAVE_PNG
9
9
10
- #ifdef HAVE_LIBPNG_PNG_H
11
- #include < libpng/png.h>
12
- #else
13
- #include < png.h>
14
- #endif
15
-
16
10
TEST (Imgcodecs_Png, write_big)
17
11
{
18
12
const string root = cvtest::TS::ptr ()->get_data_path ();
@@ -99,7 +93,6 @@ TEST(Imgcodecs_Png, read_color_palette_with_alpha)
99
93
EXPECT_EQ (img.at <Vec3b>(0 , 1 ), Vec3b (0 , 0 , 255 ));
100
94
}
101
95
102
- #ifdef PNG_eXIf_SUPPORTED
103
96
/* *
104
97
* Test for check whether reading exif orientation tag was processed successfully or not
105
98
* The test info is the set of 8 images named testExifRotate_{1 to 8}.png
@@ -144,7 +137,11 @@ TEST(Imgcodecs_Png, read_color_palette_with_alpha)
144
137
typedef testing::TestWithParam<string> Imgcodecs_PNG_Exif;
145
138
146
139
// Solution to issue 16579: PNG read doesn't support Exif orientation data
140
+ #ifdef OPENCV_IMGCODECS_PNG_WITH_EXIF
147
141
TEST_P (Imgcodecs_PNG_Exif, exif_orientation)
142
+ #else
143
+ TEST_P (Imgcodecs_PNG_Exif, DISABLED_exif_orientation)
144
+ #endif
148
145
{
149
146
const string root = cvtest::TS::ptr ()->get_data_path ();
150
147
const string filename = root + GetParam ();
@@ -188,7 +185,6 @@ const string exif_files[] =
188
185
189
186
INSTANTIATE_TEST_CASE_P (ExifFiles, Imgcodecs_PNG_Exif,
190
187
testing::ValuesIn (exif_files));
191
- #endif // PNG_eXIf_SUPPORTED
192
188
193
189
#endif // HAVE_PNG
194
190
0 commit comments