diff --git a/modules/highgui/src/window_w32.cpp b/modules/highgui/src/window_w32.cpp index 98f876a34f..32b2392904 100644 --- a/modules/highgui/src/window_w32.cpp +++ b/modules/highgui/src/window_w32.cpp @@ -2161,7 +2161,7 @@ static void showSaveDialog(CvWindow& window) #ifdef HAVE_TIFF "TIFF Files (*.tiff;*.tif)\0*.tiff;*.tif\0" #endif -#ifdef HAVE_JASPER +#if defined(HAVE_JASPER) || defined(HAVE_OPENJPEG) "JPEG-2000 files (*.jp2)\0*.jp2\0" #endif #ifdef HAVE_WEBP diff --git a/modules/imgcodecs/perf/perf_jpeg.cpp b/modules/imgcodecs/perf/perf_jpeg.cpp index 694e2e698e..7063ca909c 100644 --- a/modules/imgcodecs/perf/perf_jpeg.cpp +++ b/modules/imgcodecs/perf/perf_jpeg.cpp @@ -5,6 +5,9 @@ namespace opencv_test { + +#ifdef HAVE_JPEG + using namespace perf; PERF_TEST(JPEG, Decode) @@ -35,4 +38,6 @@ PERF_TEST(JPEG, Encode) SANITY_CHECK_NOTHING(); } +#endif // HAVE_JPEG + } // namespace \ No newline at end of file diff --git a/modules/imgcodecs/perf/perf_png.cpp b/modules/imgcodecs/perf/perf_png.cpp index 7893d841c4..1af4780882 100644 --- a/modules/imgcodecs/perf/perf_png.cpp +++ b/modules/imgcodecs/perf/perf_png.cpp @@ -6,6 +6,9 @@ namespace opencv_test { + +#if defined(HAVE_PNG) || defined(HAVE_SPNG) + using namespace perf; typedef perf::TestBaseWithParam PNG; @@ -38,4 +41,6 @@ PERF_TEST(PNG, encode) SANITY_CHECK_NOTHING(); } +#endif // HAVE_PNG + } // namespace diff --git a/modules/imgcodecs/test/test_grfmt.cpp b/modules/imgcodecs/test/test_grfmt.cpp index 826f3d9836..1e0bf47b47 100644 --- a/modules/imgcodecs/test/test_grfmt.cpp +++ b/modules/imgcodecs/test/test_grfmt.cpp @@ -87,11 +87,17 @@ const string all_images[] = "readwrite/uint16-mono2.dcm", "readwrite/uint8-rgb.dcm", #endif +#if defined(HAVE_PNG) || defined(HAVE_SPNG) "readwrite/color_palette_alpha.png", +#endif +#ifdef HAVE_TIFF "readwrite/multipage.tif", +#endif "readwrite/ordinary.bmp", "readwrite/rle8.bmp", +#ifdef HAVE_JPEG "readwrite/test_1_c1.jpg", +#endif #ifdef HAVE_IMGCODEC_HDR "readwrite/rle.hdr" #endif diff --git a/modules/imgcodecs/test/test_read_write.cpp b/modules/imgcodecs/test/test_read_write.cpp index 2320147a4e..39c02ca95c 100644 --- a/modules/imgcodecs/test/test_read_write.cpp +++ b/modules/imgcodecs/test/test_read_write.cpp @@ -303,6 +303,7 @@ TEST(Imgcodecs_Image, write_umat) EXPECT_EQ(0, remove(dst_name.c_str())); } +#ifdef HAVE_TIFF TEST(Imgcodecs_Image, multipage_collection_size) { 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); } } +#endif TEST(Imgcodecs_Params, imwrite_regression_22752)