Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some high resolution pictures aren't rendered well #684

Open
xfzv opened this issue Aug 12, 2023 · 4 comments
Open

Some high resolution pictures aren't rendered well #684

xfzv opened this issue Aug 12, 2023 · 4 comments

Comments

@xfzv
Copy link
Contributor

xfzv commented Aug 12, 2023

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

1


2


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.

@jcjgraf
Copy link
Contributor

jcjgraf commented Aug 13, 2023

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.

@xfzv
Copy link
Contributor Author

xfzv commented Aug 13, 2023

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.

vimiv_debug.log

Send.vis.ee - 02.jpg (expires in 3 days)

@karlch
Copy link
Owner

karlch commented Aug 14, 2023

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.

@karlch
Copy link
Owner

karlch commented Aug 17, 2023

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 😞 Hopefully we can hide this in a clean way, e.g., by subclassing the view, the scene, or the item.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants