vimiv-qt
vimiv-qt copied to clipboard
Some high resolution pictures aren't rendered well
I was browsing some of my pictures and noticed some of them looked quite ugly with vimiv compared to qimgv or qView for example.
Occurs on Gentoo and Arch Linux with 0.9.0, only with some specific high resolution pictures (not all of them).
The quality degradation is also clearly visible in full screen. Nothing is printed with ❯ vimiv --log-level=info $IMAGE.jpg.
- Top: vimiv
- Bottom: qimgv
Edit: I can reproduce with qView by disabling "Image scaling" in Settings > Image.
I couldn't find anything on this in the documentation (which is very well-written by the way) but maybe I'm just blind.
Thanks for reporting this issue. This is due to aliasing I guess; Your high-resolution image has this very regular grid-like pattern, which leads to this distortion when getting scaled-down. To verify this hypothesis, when you zoom-in then the images looks normal again, right?
I have notices aliasing in the thumbnail view before (which did not really bother me), ~but I do not have images of high-enough resolution to have that happen in image view too~ I can reporduce it by zooming in on certain images. If you provide us some example images we can look into it.
Nothing is printed with
❯ vimiv --log-level=info $IMAGE.jpg
There are just very few info logs. Use --log-level debug if you can so see that is going on.
I couldn't find anything on this in the documentation
There is no such option in vimiv.
To verify this hypothesis, when you zoom-in then the images looks normal again, right?
No, it still looks bad when zooming in compared to other image viewers.
Send.vis.ee - 02.jpg (expires in 3 days)
Interesting, thanks for the catch and the discussions! I can definitely reproduce with your example file. Will probably need some digging to see what the other image viewers do differently in this case.
Some first little thoughts, so this doesn't get lost.
Issue seems to be that the QGraphicsView used for displaying images does not scale them well. The workaround is to scale the pixmap directly, and update the QGraphicsPixmapItem directly with the new pixmap. This seems really ugly to me :disappointed: Hopefully we can hide this in a clean way, e.g., by subclassing the view, the scene, or the item.