diff --git a/tests/image/cross_bicubic_256x256.png b/tests/image/cross_bicubic_256x256.png new file mode 100644 index 0000000000..e7f5d407a6 Binary files /dev/null and b/tests/image/cross_bicubic_256x256.png differ diff --git a/tests/image/cross_bilinear_256x256.png b/tests/image/cross_bilinear_256x256.png new file mode 100644 index 0000000000..1a81301bc2 Binary files /dev/null and b/tests/image/cross_bilinear_256x256.png differ diff --git a/tests/image/cross_box_average_256x256.png b/tests/image/cross_box_average_256x256.png new file mode 100644 index 0000000000..9564a5a798 Binary files /dev/null and b/tests/image/cross_box_average_256x256.png differ diff --git a/tests/image/cross_nearest_neighb_256x256.png b/tests/image/cross_nearest_neighb_256x256.png new file mode 100644 index 0000000000..73a14eefc6 Binary files /dev/null and b/tests/image/cross_nearest_neighb_256x256.png differ diff --git a/tests/image/image.cpp b/tests/image/image.cpp index dec7c5a0c4..7d8731d911 100644 --- a/tests/image/image.cpp +++ b/tests/image/image.cpp @@ -1422,6 +1422,36 @@ void ImageTestCase::ScaleCompare() "image/horse_bilinear_150x150.png"); ASSERT_IMAGE_EQUAL_TO_FILE(original.Scale(300, 300, wxIMAGE_QUALITY_BILINEAR), "image/horse_bilinear_300x300.png"); + + // Test scaling symmetric image + const static char* cross_xpm[] = + { + "9 9 5 1", + " c None", + "r c #FF0000", + "g c #00FF00", + "b c #0000FF", + "w c #FFFFFF", + " r ", + " g ", + " b ", + " w ", + "rgbw wbgr", + " w ", + " b ", + " g ", + " r " + }; + + wxImage imgCross(cross_xpm); + ASSERT_IMAGE_EQUAL_TO_FILE(imgCross.Scale(256, 256, wxIMAGE_QUALITY_BILINEAR), + "image/cross_bilinear_256x256.png"); + ASSERT_IMAGE_EQUAL_TO_FILE(imgCross.Scale(256, 256, wxIMAGE_QUALITY_BICUBIC), + "image/cross_bicubic_256x256.png"); + ASSERT_IMAGE_EQUAL_TO_FILE(imgCross.Scale(256, 256, wxIMAGE_QUALITY_BOX_AVERAGE), + "image/cross_box_average_256x256.png"); + ASSERT_IMAGE_EQUAL_TO_FILE(imgCross.Scale(256, 256, wxIMAGE_QUALITY_NEAREST), + "image/cross_nearest_neighb_256x256.png"); } #endif //wxUSE_IMAGE