32-bit floating precision causing glitches and errors in images
Environment/Versions
- GIMP version: 2.10.34
- Package: Gimp.org
- Operating System: Windows 11
Description of the bug
Specific layers are glitched when performing scaling or filtering (eg gaussian blur) operations in 32-bit floating point precision (perceptual/linear option seems irrelevant): https://drive.google.com/file/d/1Ya3TBJ5AeNMmCrZQ2u9eEjFqesG_18pT/view?usp=share_link
Changing to integer precision causes the glitch to disappear: https://drive.google.com/file/d/1L8Al7eQfcmv2zW1h3DvCvYKcBnQVgHqZ/view?usp=share_link
The issue has been present in stable GIMP builds for at least several years. The following video was recorded in July 2021 with an older GIMP build and I can no longer reproduce the specific bug shown with 2.10.34, but I'll include it in case it helps reveal the problem. When performing a simple bucket fill into a circular selection on a layer above a solid black background the background was erased by four lines in diagonal directions by the bucket fill. Halfway through the video I switched to integer precision to demonstrate that the fill then works normally (again, this specific instance of the bug seems fixed in new versions): https://drive.google.com/file/d/1Z_2_9m7KcUWqvk4vRLW9zwKroqdInTAN/view?usp=share_link 2021-07-12_11-55-21
Reproduction
Is the bug reproducible? Always
Reproduction steps:
-
Download the xcf file here: https://drive.google.com/file/d/1ty_ri6Nc8a_E4mCedySSTQ1sL0P_kxry/view?usp=share_link issue_demo.xcf
-
Scale the image down 50%, to 512x512, using nohalo
…
Expected result: The image should remain unchanged aside from the lower resolution
Actual result: The top layer, named "edge," is glitched with lines that erase all lower layers. Switching to 32-bit integer precision fixes the issue.
Additional information
There were no error messages in the docked error window when scaling the image, but I did record a performance log during the operations that caused the glitch and the integer conversion that fixed it: https://drive.google.com/file/d/1jgKNIKCkvM3vXiIxEZUCtNDqwvewk3kt/view?usp=share_link gimp-performance_1_.log
I am using an AMD 7900 CPU with 32GB DDR5 and an Nvidia RTX 3070. All of my drivers and software are up to date.