Update imgcodecs tests

pull/25525/head
Suleyman TURKMEN 6 months ago
parent 75f3f0fac8
commit 7d6b6161cc
  1. 2
      modules/highgui/src/window_w32.cpp
  2. 5
      modules/imgcodecs/perf/perf_jpeg.cpp
  3. 5
      modules/imgcodecs/perf/perf_png.cpp
  4. 6
      modules/imgcodecs/test/test_grfmt.cpp
  5. 2
      modules/imgcodecs/test/test_read_write.cpp

@ -2161,7 +2161,7 @@ static void showSaveDialog(CvWindow& window)
#ifdef HAVE_TIFF #ifdef HAVE_TIFF
"TIFF Files (*.tiff;*.tif)\0*.tiff;*.tif\0" "TIFF Files (*.tiff;*.tif)\0*.tiff;*.tif\0"
#endif #endif
#ifdef HAVE_JASPER #if defined(HAVE_JASPER) || defined(HAVE_OPENJPEG)
"JPEG-2000 files (*.jp2)\0*.jp2\0" "JPEG-2000 files (*.jp2)\0*.jp2\0"
#endif #endif
#ifdef HAVE_WEBP #ifdef HAVE_WEBP

@ -5,6 +5,9 @@
namespace opencv_test namespace opencv_test
{ {
#ifdef HAVE_JPEG
using namespace perf; using namespace perf;
PERF_TEST(JPEG, Decode) PERF_TEST(JPEG, Decode)
@ -35,4 +38,6 @@ PERF_TEST(JPEG, Encode)
SANITY_CHECK_NOTHING(); SANITY_CHECK_NOTHING();
} }
#endif // HAVE_JPEG
} // namespace } // namespace

@ -6,6 +6,9 @@
namespace opencv_test namespace opencv_test
{ {
#if defined(HAVE_PNG) || defined(HAVE_SPNG)
using namespace perf; using namespace perf;
typedef perf::TestBaseWithParam<std::string> PNG; typedef perf::TestBaseWithParam<std::string> PNG;
@ -38,4 +41,6 @@ PERF_TEST(PNG, encode)
SANITY_CHECK_NOTHING(); SANITY_CHECK_NOTHING();
} }
#endif // HAVE_PNG
} // namespace } // namespace

@ -87,11 +87,17 @@ const string all_images[] =
"readwrite/uint16-mono2.dcm", "readwrite/uint16-mono2.dcm",
"readwrite/uint8-rgb.dcm", "readwrite/uint8-rgb.dcm",
#endif #endif
#if defined(HAVE_PNG) || defined(HAVE_SPNG)
"readwrite/color_palette_alpha.png", "readwrite/color_palette_alpha.png",
#endif
#ifdef HAVE_TIFF
"readwrite/multipage.tif", "readwrite/multipage.tif",
#endif
"readwrite/ordinary.bmp", "readwrite/ordinary.bmp",
"readwrite/rle8.bmp", "readwrite/rle8.bmp",
#ifdef HAVE_JPEG
"readwrite/test_1_c1.jpg", "readwrite/test_1_c1.jpg",
#endif
#ifdef HAVE_IMGCODEC_HDR #ifdef HAVE_IMGCODEC_HDR
"readwrite/rle.hdr" "readwrite/rle.hdr"
#endif #endif

@ -303,6 +303,7 @@ TEST(Imgcodecs_Image, write_umat)
EXPECT_EQ(0, remove(dst_name.c_str())); EXPECT_EQ(0, remove(dst_name.c_str()));
} }
#ifdef HAVE_TIFF
TEST(Imgcodecs_Image, multipage_collection_size) TEST(Imgcodecs_Image, multipage_collection_size)
{ {
const string root = cvtest::TS::ptr()->get_data_path(); const string root = cvtest::TS::ptr()->get_data_path();
@ -479,6 +480,7 @@ TEST(ImgCodecs, multipage_collection_two_iterator_operatorpp)
EXPECT_TRUE(cv::norm(img1, img[i], NORM_INF) == 0); EXPECT_TRUE(cv::norm(img1, img[i], NORM_INF) == 0);
} }
} }
#endif
TEST(Imgcodecs_Params, imwrite_regression_22752) TEST(Imgcodecs_Params, imwrite_regression_22752)

Loading…
Cancel
Save