wxwidgets/tests
Artur Wieczorek 097625de52 Fixed rescaling of wxImage
When wxImage is rescaled with wxIMAGE_QUALITY_BILINEAR, wxIMAGE_QUALITY_BICUBIC or wxIMAGE_QUALITY_BOX_AVERAGE algorithm then for proper interpolation there is necessary to uniformly (linearly) map entire pixel range in the new image to the entire pixel range in the current image, i.e. pixels positions (integer values) in range [0..newDim-1] has to be mapped to "virtual" pixel positions (not necessary integer values) exactly in the range [0..oldDim-1].
[0..oldDim-1] range of target mapping is required because for proper interpolation every "virtual" pixel has to be located between two physical pixels in the current image.
Thus scaling ratio used to find corresponding pixels in the current image should be (oldDim-1)/(newDim-1) and not oldDim/newDim (which is used now).
When image is e.g. upsampled oldDim/newDim ratio then some new rightmost/botommost pixels are mapped to old pixels > (oldDim-1) and their values are improperly interpolated (in the current implementation their positions are just truncated to (oldDim-1) to bypass the problem and upsampled image looks like it was shifted left/up). The larger scaling ratio the effect is more visible.

Note:
Because reference images used currently in the unit tests were created with improper scaling there is necessary to upload new reference images created with fixed scaling.

Closes #17594
2016-07-22 23:00:33 +02:00
..
any Use wx-prefixed macros throughout the repository. 2015-04-23 22:00:35 +04:00
archive Don't use std::auto_ptr<> in the test to avoid warnings 2016-02-13 13:36:58 +01:00
arrays Use wx-prefixed macros throughout the repository. 2015-04-23 22:00:35 +04:00
base64 Use wx-prefixed macros throughout the repository. 2015-04-23 22:00:35 +04:00
benchmarks Added drawing rounded rectangles to the graphics benchmark. 2016-06-05 23:14:48 +02:00
cmdline Use wx-prefixed macros throughout the repository. 2015-04-23 22:00:35 +04:00
config Use wx-prefixed macros throughout the repository. 2015-04-23 22:00:35 +04:00
controls Avoid asserts when destroying windows with mouse capture in tests 2016-06-29 18:26:11 +02:00
datetime Make wxTimeSpan::operator-() const 2016-06-30 19:09:04 +02:00
drawing Fix harmless deprecation warning for g_type_init() in drawing test 2016-02-26 14:34:23 +01:00
events Revert "Fix fields initialization in wxCommandEvent copy ctor." 2016-01-30 05:02:54 +01:00
exec Use wx-prefixed macros throughout the repository. 2015-04-23 22:00:35 +04:00
file Revert "Temporarily ensure that the file functions test uses UTF-8" 2016-02-19 02:52:43 +01:00
filekind Remove all lines containing cvs/svn "$Id$" keyword. 2013-07-26 16:02:46 +00:00
filename Remove symlinks time comparison tests from wxFileName test 2016-02-13 18:55:53 +01:00
filesys Return valie file URLs from wxFileSystem::FileNameToURL() 2016-02-05 22:43:23 +01:00
font Fix 'not enough actual parameters for macro' warning 2016-04-15 02:35:40 +00:00
fontmap Use wx-prefixed macros throughout the repository. 2015-04-23 22:00:35 +04:00
formatconverter Remove all lines containing cvs/svn "$Id$" keyword. 2013-07-26 16:02:46 +00:00
fswatcher Use FSEvents in wxFileSystemWatcher on OS X 2015-06-06 02:37:35 +04:00
geometry Use wx-prefixed macros throughout the repository. 2015-04-23 22:00:35 +04:00
graphics Modified parameters in clipping box tests. 2016-07-17 18:19:32 +02:00
hashes Turn off optimizations for all gcc versions in hash unit tests 2016-06-29 15:43:01 +02:00
html Avoid asserts when destroying windows with mouse capture in tests 2016-06-29 18:26:11 +02:00
image Fixed rescaling of wxImage 2016-07-22 23:00:33 +02:00
interactive Add wxStandardPaths::GetUserDir() to get Desktop, Download etc 2015-10-04 01:05:23 +02:00
intl Strip mnemonics from CJK translations of menu items too 2016-06-26 18:36:11 +02:00
lists Use wx-prefixed macros throughout the repository. 2015-04-23 22:00:35 +04:00
log Remove MSVC6 support. 2014-05-15 22:32:17 +00:00
longlong Use wx-prefixed macros throughout the repository. 2015-04-23 22:00:35 +04:00
mbconv Add a test checking that conversions involving surrogates work 2015-11-13 20:32:24 +01:00
menu Improve translated mnemonics unit test 2016-06-26 18:36:14 +02:00
misc Fix mismatched new[]/delete in a test case. 2015-06-19 16:32:14 +02:00
net Use wx-prefixed macros throughout the repository. 2015-04-23 22:00:35 +04:00
regex Remove MSVC6 support. 2014-05-15 22:32:17 +00:00
scopeguard Remove all lines containing cvs/svn "$Id$" keyword. 2013-07-26 16:02:46 +00:00
sizers Rename wxBoxSizer::m_minSize to avoid clash with the base class 2015-10-11 01:00:38 +02:00
streams Handle strings with embedded NULs in wxDataStream 2016-06-04 21:47:12 +02:00
strings Skip the recently added wxString test broken with libc++ 2016-07-16 01:46:45 +02:00
textfile Don't crash in wxTextFile::GetLastLine() if the file is empty 2016-06-09 16:48:01 +02:00
thread Use wx-prefixed macros throughout the repository. 2015-04-23 22:00:35 +04:00
toplevel Use wx-prefixed macros throughout the repository. 2015-04-23 22:00:35 +04:00
uris Fix wxURI::Unescape() to work with Unicode strings 2016-02-13 04:01:27 +01:00
validators This statement that will cause segmentation fault before. Now it ok and enable it 2014-09-23 17:44:30 +00:00
vectors Use wx-prefixed macros throughout the repository. 2015-04-23 22:00:35 +04:00
weakref Use wx-prefixed macros throughout the repository. 2015-04-23 22:00:35 +04:00
window Use wx-prefixed macros throughout the repository. 2015-04-23 22:00:35 +04:00
xlocale Use wx-prefixed macros throughout the repository. 2015-04-23 22:00:35 +04:00
xml Add support for DOCTYPE to wxXmlDocument. 2015-04-26 15:36:48 +02:00
asserthelper.cpp Replace anonymous namespace with a named one in the test helpers. 2014-07-14 19:17:12 +00:00
asserthelper.h Replace anonymous namespace with a named one in the test helpers. 2014-07-14 19:17:12 +00:00
descrip.mms Fixes for OpenVMS on IA64 2011-09-29 13:47:38 +00:00
dummy.cpp
horse.ani add wxImage test units to test loading from both seekable and non-seekable streams 2009-06-01 11:46:36 +00:00
horse.bmp add wxImage test units to test loading from both seekable and non-seekable streams 2009-06-01 11:46:36 +00:00
horse.cur add wxImage test units to test loading from both seekable and non-seekable streams 2009-06-01 11:46:36 +00:00
horse.gif add wxImage test units to test loading from both seekable and non-seekable streams 2009-06-01 11:46:36 +00:00
horse.ico add wxImage test units to test loading from both seekable and non-seekable streams 2009-06-01 11:46:36 +00:00
horse.jpg add wxImage test units to test loading from both seekable and non-seekable streams 2009-06-01 11:46:36 +00:00
horse.pcx add wxImage test units to test loading from both seekable and non-seekable streams 2009-06-01 11:46:36 +00:00
horse.png add wxImage test units to test loading from both seekable and non-seekable streams 2009-06-01 11:46:36 +00:00
horse.pnm add wxImage test units to test loading from both seekable and non-seekable streams 2009-06-01 11:46:36 +00:00
horse.tga add wxImage test units to test loading from both seekable and non-seekable streams 2009-06-01 11:46:36 +00:00
horse.tif add wxImage test units to test loading from both seekable and non-seekable streams 2009-06-01 11:46:36 +00:00
horse.xpm Convert all XPM files to Unix EOLs. 2015-03-19 21:46:05 +01:00
makefile.bcc Added new tests to check clipping box calculations for wxDC and wxGCDC. 2016-06-29 21:01:36 +02:00
makefile.gcc Added new tests to check clipping box calculations for wxDC and wxGCDC. 2016-06-29 21:01:36 +02:00
Makefile.in Added new tests to check clipping box calculations for wxDC and wxGCDC. 2016-06-29 21:01:36 +02:00
makefile.vc Added new tests to check clipping box calculations for wxDC and wxGCDC. 2016-06-29 21:01:36 +02:00
runtests.bat Remove all lines containing cvs/svn "$Id$" keyword. 2013-07-26 16:02:46 +00:00
test.bkl Added new tests to check clipping box calculations for wxDC and wxGCDC. 2016-06-29 21:01:36 +02:00
test.cpp g_log_set_default_handler not avaliable for gtk1 2016-07-08 15:15:27 +02:00
test.vcxproj Add MSVS 2010, 2012, 2013 and 2015 projects for the tests 2016-02-05 22:43:23 +01:00
test.vcxproj.filters Add MSVS 2010, 2012, 2013 and 2015 projects for the tests 2016-02-05 22:43:23 +01:00
test_gui.vcxproj Added new tests to check clipping box calculations for wxDC and wxGCDC. 2016-06-29 21:01:36 +02:00
test_gui.vcxproj.filters Added new tests to check clipping box calculations for wxDC and wxGCDC. 2016-06-29 21:01:36 +02:00
test_gui_vc10.sln Add MSVS 2010, 2012, 2013 and 2015 projects for the tests 2016-02-05 22:43:23 +01:00
test_gui_vc11.sln Add MSVS 2010, 2012, 2013 and 2015 projects for the tests 2016-02-05 22:43:23 +01:00
test_gui_vc12.sln Add MSVS 2010, 2012, 2013 and 2015 projects for the tests 2016-02-05 22:43:23 +01:00
test_gui_vc14.sln Add MSVS 2010, 2012, 2013 and 2015 projects for the tests 2016-02-05 22:43:23 +01:00
test_vc7_printfbench.vcproj Sync EOL normalization settings. 2015-03-17 13:47:20 -06:00
test_vc7_test.vcproj Link with shlwapi.lib and version.lib under MSW 2015-10-07 18:56:33 +02:00
test_vc7_test_drawing.vcproj Link with shlwapi.lib and version.lib under MSW 2015-10-07 18:56:33 +02:00
test_vc7_test_drawingplugin.vcproj Link with shlwapi.lib and version.lib under MSW 2015-10-07 18:56:33 +02:00
test_vc7_test_gui.vcproj Added new tests to check clipping box calculations for wxDC and wxGCDC. 2016-06-29 21:01:36 +02:00
test_vc8_printfbench.vcproj Sync EOL normalization settings. 2015-03-17 13:47:20 -06:00
test_vc8_test.vcproj Link with shlwapi.lib and version.lib under MSW 2015-10-07 18:56:33 +02:00
test_vc8_test_drawing.vcproj Link with shlwapi.lib and version.lib under MSW 2015-10-07 18:56:33 +02:00
test_vc8_test_drawingplugin.vcproj Link with shlwapi.lib and version.lib under MSW 2015-10-07 18:56:33 +02:00
test_vc8_test_gui.vcproj Added new tests to check clipping box calculations for wxDC and wxGCDC. 2016-06-29 21:01:36 +02:00
test_vc9_printfbench.vcproj Sync EOL normalization settings. 2015-03-17 13:47:20 -06:00
test_vc9_test.vcproj Link with shlwapi.lib and version.lib under MSW 2015-10-07 18:56:33 +02:00
test_vc9_test_drawing.vcproj Link with shlwapi.lib and version.lib under MSW 2015-10-07 18:56:33 +02:00
test_vc9_test_drawingplugin.vcproj Link with shlwapi.lib and version.lib under MSW 2015-10-07 18:56:33 +02:00
test_vc9_test_gui.vcproj Added new tests to check clipping box calculations for wxDC and wxGCDC. 2016-06-29 21:01:36 +02:00
test_vc10.sln Add MSVS 2010, 2012, 2013 and 2015 projects for the tests 2016-02-05 22:43:23 +01:00
test_vc11.sln Add MSVS 2010, 2012, 2013 and 2015 projects for the tests 2016-02-05 22:43:23 +01:00
test_vc12.sln Add MSVS 2010, 2012, 2013 and 2015 projects for the tests 2016-02-05 22:43:23 +01:00
test_vc14.sln Add MSVS 2010, 2012, 2013 and 2015 projects for the tests 2016-02-05 22:43:23 +01:00
testableframe.cpp Show wxTestableFrame from its ctor 2016-02-27 02:41:18 +01:00
testableframe.h Remove all lines containing cvs/svn "$Id$" keyword. 2013-07-26 16:02:46 +00:00
testdata.fc
testdate.h Make wxTimeSpan::operator-() const 2016-06-30 19:09:04 +02:00
testfile.h Remove all lines containing cvs/svn "$Id$" keyword. 2013-07-26 16:02:46 +00:00
testimage.h Remove all lines containing cvs/svn "$Id$" keyword. 2013-07-26 16:02:46 +00:00
testprec.h Avoid asserts when destroying windows with mouse capture in tests 2016-06-29 18:26:11 +02:00