I think I found a bug in GIMP 2.10.8 (or in the Appimage from @Carmelo_DrRaw ).
As you can see in the following included screenshot, I have a 16bit grayscale tiff image (scanned film) and I try to resize it with the new GIMP 2.10.8 (Image → Scale Image…).
The outcome of the scale is a completely messed up image, as you ca see.
‘Original’ picture:
Scale input form (I just set an x value, the y is kept linked):
After the scale is executed:
Now, I’ve made many different attempts and I can definitely conclude that this is reproducible.
All the attempts were performed on 4 different setup:
- Ubuntu 16.04 running on a desktop (attached screenshots)
- Fedora 28 running on a desktop
- CentOS7 running in a VirtualBox 5.2.22 VM (with guest additions)
- Ubuntu 18.04 running on a laptop
In all the 4 of them, it happened as follows, quite consistently (this description is actually a summary, I really tried a lot of different things).
I’ve tried with jpeg 8bit and tif 16bit files. When I resize a jpg, the outcome is a completely white image (sometimes with random black pixels around).
When I try to resize an RGB image, the scale works as expected, it doesn’t matter which interpolation I try.
But if I convert the image to grayscale before resizing (Image → Mode → Grayscale), then I see exactly the same wrong behaviour of the scale tool.
Moreover, if I convert the grayscale image (e.g. the one in the screenshots above) to RGB before resizing, then the scale works as expected, with every interpolation.
Interestingly, if I try to scale to a ‘not too much smaller’ dimension, compared to the starting one, everything works perfectly. For instance, if the image above (~3500 pixel on the long side) is scaled to ~3000 pixel on the long side, then I don’t see any problem.
Please note, I’ve tried only with the appimage from @Carmelo_DrRaw (linked in this post: GIMP 2.10.8 is now out. - #3 by Carmelo_DrRaw), I don’t know then if it’s a bug of GIMP or of the package (that’s why I posted here before filing a bug report).
Conclusions:
- It seems that grayscale images can’t be correctly resized with the ‘Cubic’ interpolation. The other interpolation method, however, seem to work correctly.
- If the image is converted to RGB before resizing, then also the ‘Cubic’ interpolation works
- No issue was found on RGB images; however, if an RGB image is converted to grayscale before converting, then the outcome is not correct.
- It seems that this issue comes out when trying to rescale toward a dimension smaller than the half (long side) of the original image.
I’m available for further testing upon request. I can also provide the images that I’ve used, but I guess any grayscale image would do (while testing on different environments I basically just picked whatever picture I could find around; I also downloaded the Appimage every time).
bill