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

Reduced color depth in album art display #262

Open
marcel-100 opened this issue Jul 29, 2018 · 7 comments
Open

Reduced color depth in album art display #262

marcel-100 opened this issue Jul 29, 2018 · 7 comments

Comments

@marcel-100
Copy link

Hey folks,

the album art shows some weird artifacts, apparently due to color depth reduction. I've created a colorful test file to illustrate the issue. The album art is a 8 bits per channel RGB PNG file without any compression whatsoever embedded into a FLAC file. Note that viewing the PNG file on its own in the phone's default image viewing app does not show any artifacts. The same goes for playing the audio file in VLC.

In Phonograph

screenshot

What the album art is supposed to look like

original

Devices are Lenovo K10a40 and Lenovo Tab10
bot with Android 6.0 and Phonograph 1.1.2 Pro and free

@marcel-100
Copy link
Author

Disabling "Ignore Media Store Cover" doesn't really affect the issue. If anything, it makes matters worse by slightly blurring the image.

@arkon
Copy link
Collaborator

arkon commented Jul 29, 2018

Memory constraints are typically the concern here since the "better" decoding algorithms use more memory and most Android phones don't have a lot of memory.

@marcel-100
Copy link
Author

marcel-100 commented Jul 29, 2018

The original PNG is 720 by 720 pixels, that is 720^2 * 3 bytes which totals at about 1.6 MB (V)RAM usage if fully decompressed.

I've created a second test file with significantly smaller dimensions. It's 256 by 256, requiring only about 0.2 MBs. The result is the same unfortunately.

I would like to add that both figures are negligible in comparison to something like 1 GB of RAM available even on low-end devices.

This StackOverflow question might be relevant: https://stackoverflow.com/questions/21050649/color-depth-in-android#21051007

@arkon
Copy link
Collaborator

arkon commented Jul 29, 2018

I suppose we could try to prefer ARGB_8888.

Worth keeping in mind that there's a per-app limit on memory too, which differs by device, and that the app needs to buffer the actual music and such in memory.

@marcel-100
Copy link
Author

I didn't know that Android has such strict policies concerning memory usage. I rather expected some kind of swapping to occur if RAM gets low.

Nonetheless I would very much appreciate if you guys gave ARGB_8888 a try in some upcoming release :)

@marcel-100
Copy link
Author

1.2.0 is out, but album art sadly remains low quality. The guys from Vinyl don't have this issue though.

@arkon
Copy link
Collaborator

arkon commented Jan 27, 2019

We'll probably need to update Glide.

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

No branches or pull requests

2 participants