Downscaling big images with the OpenGL renderer results in bad quality
I noticed that displaying images in a size much smaller than the original image size (<0.5x) using the OpenGL renderer results in the image quality being very bad (looking like integer scaling). I'm not sure whether application developers are supposed to handle this manually or whether this can be counted as a bug.
Steps to reproduce
- Display a non-vector image (ex. in GtkImage, GtkPicture)
- Shrink it (< 0.5 * native size)
Current behavior
The image quality is bad when downscaling big images.
Expected outcome
The result looks similar to what cairo renders.
Version information
- GTK: 4.6.6, 4.6.7 (others untested)
- Tested OS: Manjaro, Fedora Silverblue 35 (toolbox + Flatpak), Fedora Silverblue 36 (toolbox + Flatpak)
- Tested GPU: zink/lavapipe, AMD RX5700 (amdgpu + radeon + zink/amdgpu, zink/radeon), Intel UHD Graphics 600
Additional information
I tested resizing a test image using the Workbench app. (I also tested this in own programs)
Using GSK_RENDERER=cairo
:
cairo
Using GSK_RENDERER=gl
:
opengl
Ref.: gnome-music#513 (closed)
Edited by David Keller