-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
[Request]: Use a better image scaling algorithm to avoid blurry avatars #383
Comments
Tuba does not touch scaling, the workflow is: GET image -> Pixbuf from inputstream -> Texture for Pixbuf Since they are AdwAvatars, libadwaita is responsible for filtering, specifically these lines: https://gitlab.gnome.org/GNOME/libadwaita/-/blob/main/src/adw-avatar.c#L245-269 |
As you can see, libadwaita just uses the GTK API for scaling textures there, not some custom drawing that can blur images weirdly. It's also similar to the Amberol issue, but kinda tangentionally. The old Amberol rendering from that issue is same as what libadwaita had before 1.3. The one Amberol does now is same as what libadwaita does (except the Amberol one breaks on hidpi, that's what the scale factor part is about in the libadwaita code, see the fix), and you should see the same quality if you use your avatar as a cover art. So if you don't like how GTK downscales images, that would be GTK and not libadwaita. |
Thanks for the info Alice! I'll go ahead and close this. |
Hang on... this apparently already exists in GTK, and therefore the app (or libadwaita?!) should do it, if this closed ticket is any indication:
|
It does do it. That's what you're seeing. |
Based on the various chat discussions, I have now filed an issue in GTK itself, as presumably the trilinear filtering is not giving the expected results: https://gitlab.gnome.org/GNOME/gtk/-/issues/5980 |
Describe the request
Tuba's scaling of avatars in the timeline view makes them look very blurry compared to the ones shown in the Mastodon web UI (or even compared to your avatar in the top-left corner of the UI). This is on a regular (non-HiDPI) screen.
Underneath is Epiphany (or Firefox, or any browser)'s rendering of avatars on the Mastodon web interface, and on top of it is Tuba's rendering of those same avatars. I don't think you'll be able to un-see this :)
The Mastodon web UI does not pre-process/pre-scale those images, the browser scales them in realtime, as we can see by right-clicking avatars in this thread and opening their images in new tabs.
Could it be that Tuba is pre-scaling them down somehow (vs preserving a higher density version), or that it would need to use a different scaling algorithm? (in that case wonder if it's the same—or opposite—problem as the pixmaps that used bad scaling in Amberol...)
Implementation Details
The text was updated successfully, but these errors were encountered: