Stretching a narrow box introduces parasitic gradient to the box. Bug in scaling filter code.
GIMP version: 2.10.12 x64
Operating System: [Windows 7 x64]
Description of the bug
Stretching a narrow box introduces parasitic gradient to the box. Bug in scaling filter code.
When stretching a rectangular "box" area, a parasitic gradient is introduced into the stretched "box" sample.
This prevents "healing" uniform areas by stretching a sample. It SHOULD also affect precision of photo-editing operations with stretching tool.
Obviously, there is a serious error in the code of 2D filter used by stretch tool, related to boundary conditions. Incorrect boundary conditions usually give results exactly like this - a gradient to some wrong tone (alpha channel tone in the example below)
Reproduction
Is the bug reproducible? [Always]
Reproduction steps:
- take some simple and smooth pattern, like a gradient, ensure it is large enough, like 400x400 pixels.
- select a narrow "box" along the gradient (gradient is not necessary, but gives unmistakable visual result).
- Stretch it with universal transform tool along the shorter edge (dragging the longer edge).
Expected result: The gradient should be uniformly stretched without seams
Actual result: the longer edges get a parasitic gradient, in any or all of colour&alpha channels. In the example, gradient in alpha is created near the box edge, damaging the image.
Additional information
Obviously, a bug of boundary conditions in 2D scaling(resampling) filter code.
If you have a backtrace for a crash or a warning, paste it here.