Fix rescaling images with wxIMAGE_QUALITY_BOX_AVERAGE
Current algorithm used to calculate the bounds of the boxes in the source image to which the pixels in the target (rescaled) image are mapped to, has flaws which cause a non-uniform distribution of the boxes in the source image. And these miscalculations may result in the visible distortions of the colours in the rescaled image. New algorithm assures uniform distribution of the boxes in the source image and thanks to the integer arithmetic is faster than currently used and not prone to the problems with floating point representation. Closes #18012.
Before Width: | Height: | Size: 395 B After Width: | Height: | Size: 411 B |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 103 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |