mastodon / mastodon-android

Official Android app for Mastodon
https://app.joinmastodon.org/android
GNU General Public License v3.0
1.68k stars 261 forks source link

Inconsistent blur previews #556

Open Mattis142 opened 1 year ago

Mattis142 commented 1 year ago

This isn't a important issue but I'm curious why the blur method used for unloaded pictures is so weird, oftentimes not displaying a number of colors from the actual image once it has loaded. I find it very odd, some examples: Screenshot_20230331-021910_Moshidon Debug.png

this was the blurred preview while the actual post had a lot more than just pink in it Screenshot_20230331-021919_Moshidon Debug.png

and on the post the white in the preview is barely relevant to the final image: Screenshot_20230331-021550_SystemUI.png

Screenshot_20230331-021551_Moshidon Debug.png

grishka commented 1 year ago

The blur algorithm used is blurhash. It's more a multi-point gradient than proper blur. Since it's so limited in bandwidth, it doesn't work very well with images that contain many different colors.