diff --git a/build/cmake/tests/gui/CMakeLists.txt b/build/cmake/tests/gui/CMakeLists.txt index a412248df5..9ed420cfaa 100644 --- a/build/cmake/tests/gui/CMakeLists.txt +++ b/build/cmake/tests/gui/CMakeLists.txt @@ -182,7 +182,6 @@ set(TEST_GUI_DATA image/paste_result_background_plus_overlay_transparent_border_semitransparent_square.png image/paste_result_no_background_square_over_circle.png image/wx.png - image/wx.ico image/toucan.png image/toucan_hue_0.538.png image/toucan_sat_-0.41.png diff --git a/tests/graphics/imagelist.cpp b/tests/graphics/imagelist.cpp index 83f3055d2d..a8795b562d 100644 --- a/tests/graphics/imagelist.cpp +++ b/tests/graphics/imagelist.cpp @@ -68,8 +68,6 @@ ImageListTestCase::ImageListTestCase() : bmpRGB(32, 32, 24), bmpMask(32, 32, 1) { - wxInitAllImageHandlers(); - { wxMemoryDC mdc(bmpRGB); mdc.SetBackground(*wxBLUE_BRUSH); @@ -79,7 +77,15 @@ ImageListTestCase::ImageListTestCase() } REQUIRE(bmpRGB.IsOk()); - bmpRGBA.LoadFile("image/wx.png", wxBITMAP_TYPE_PNG); + // Make a bitmap with some transparent and semi-transparent pixels. + wxImage imgWithAlpha(32, 32); + imgWithAlpha.SetAlpha(); + unsigned char* const alpha = imgWithAlpha.GetAlpha(); + for ( unsigned char* a = alpha; a < alpha + 32*32; ++a ) + *a = wxALPHA_OPAQUE; + alpha[0] = wxALPHA_TRANSPARENT; + alpha[1] = wxALPHA_OPAQUE / 2; + bmpRGBA = wxBitmap(imgWithAlpha); REQUIRE(bmpRGBA.IsOk()); { @@ -103,7 +109,7 @@ ImageListTestCase::ImageListTestCase() bmpRGBAWithMask.SetMask(new wxMask(bmpMask)); REQUIRE(bmpRGBAWithMask.IsOk()); - ico.LoadFile("image/wx.ico", wxBITMAP_TYPE_ICO); + ico.CopyFromBitmap(bmpRGBWithMask); REQUIRE(ico.IsOk()); REQUIRE(bmpRGB.HasAlpha() == false); diff --git a/tests/image/wx.ico b/tests/image/wx.ico deleted file mode 100644 index 435cca2471..0000000000 Binary files a/tests/image/wx.ico and /dev/null differ