wxwidgets/tests/image
Stefan Brüns c3873ea313 Use proper rounding when casting RGB values to int
When doing an RGB->HSV->RGB roundtrip, the original value should be
restored (HSV, being double, has sufficient precision).

For e.g. `RGBValue(1,2,3)`, the equivalent resulting code for blue is
`trunc(int * 255.0 / 255.0)` (cast from double to int truncates).
At least with x87 FP math and its immediate 80bit extended precision
the resulting value is ~trunc(2.9999..), i.e. 2, similar problems may
exist on other architectures with other values.

Using proper rounding avoids the error magnification.

Closes https://github.com/wxWidgets/wxWidgets/pull/2078
2020-10-30 09:32:32 -07:00
..
cross_bicubic_256x256.png Add test of scaling wxImage 2016-07-22 23:00:48 +02:00
cross_bilinear_256x256.png Add test of scaling wxImage 2016-07-22 23:00:48 +02:00
cross_box_average_256x256.png Fix rescaling images with wxIMAGE_QUALITY_BOX_AVERAGE 2017-11-30 22:50:31 +01:00
cross_nearest_neighb_256x256.png Add test of scaling wxImage 2016-07-22 23:00:48 +02:00
horse_bicubic_50x50.png Fixed rescaling of wxImage 2016-07-22 23:00:33 +02:00
horse_bicubic_100x100.png Fixed rescaling of wxImage 2016-07-22 23:00:33 +02:00
horse_bicubic_150x150.png Fixed rescaling of wxImage 2016-07-22 23:00:33 +02:00
horse_bicubic_300x300.png Fixed rescaling of wxImage 2016-07-22 23:00:33 +02:00
horse_bilinear_50x50.png Fixed rescaling of wxImage 2016-07-22 23:00:33 +02:00
horse_bilinear_100x100.png Fixed rescaling of wxImage 2016-07-22 23:00:33 +02:00
horse_bilinear_150x150.png Fixed rescaling of wxImage 2016-07-22 23:00:33 +02:00
horse_bilinear_300x300.png Fixed rescaling of wxImage 2016-07-22 23:00:33 +02:00
horse_box_average_50x50.png Fix rescaling images with wxIMAGE_QUALITY_BOX_AVERAGE 2017-11-30 22:50:31 +01:00
horse_box_average_100x100.png Fix rescaling images with wxIMAGE_QUALITY_BOX_AVERAGE 2017-11-30 22:50:31 +01:00
horse_box_average_150x150.png Fix rescaling images with wxIMAGE_QUALITY_BOX_AVERAGE 2017-11-30 22:50:31 +01:00
horse_box_average_300x300.png Fix rescaling images with wxIMAGE_QUALITY_BOX_AVERAGE 2017-11-30 22:50:31 +01:00
horse_grey.bmp Improved BMP decoding. 2011-08-17 21:01:09 +00:00
horse_grey_flipped.bmp Improved BMP decoding. 2011-08-17 21:01:09 +00:00
horse_rle4.bmp Improved BMP decoding. 2011-08-17 21:01:09 +00:00
horse_rle4_flipped.bmp Improved BMP decoding. 2011-08-17 21:01:09 +00:00
horse_rle8.bmp Improved BMP decoding. 2011-08-17 21:01:09 +00:00
horse_rle8_flipped.bmp Improved BMP decoding. 2011-08-17 21:01:09 +00:00
image.cpp Use proper rounding when casting RGB values to int 2020-10-30 09:32:32 -07:00
paste_input_background.png Add alpha blending for wxImage::Paste 2020-09-25 01:04:49 +02:00
paste_input_black.png Fix using mask colour even if there is no mask in wxImage::Paste 2020-10-01 02:13:28 +02:00
paste_input_overlay_transparent_border_opaque_square.png Add alpha blending for wxImage::Paste 2020-09-25 01:04:49 +02:00
paste_input_overlay_transparent_border_semitransparent_circle.png Add alpha blending for wxImage::Paste 2020-09-25 01:04:49 +02:00
paste_input_overlay_transparent_border_semitransparent_square.png Add alpha blending for wxImage::Paste 2020-09-25 01:04:49 +02:00
paste_result_background_plus_circle_plus_square.png Add alpha blending for wxImage::Paste 2020-09-25 01:04:49 +02:00
paste_result_background_plus_overlay_transparent_border_opaque_square.png Add alpha blending for wxImage::Paste 2020-09-25 01:04:49 +02:00
paste_result_background_plus_overlay_transparent_border_semitransparent_square.png Add alpha blending for wxImage::Paste 2020-09-25 01:04:49 +02:00
paste_result_no_background_square_over_circle.png Add alpha blending for wxImage::Paste 2020-09-25 01:04:49 +02:00
rawbmp.cpp Remove BCC-specific hdrstop pragma from everywhere 2020-10-12 21:58:37 +02:00