Bug 464865 - Headerbar/party mode background generation algorithm does not work correctly with artwork from radio stations
Summary: Headerbar/party mode background generation algorithm does not work correctly ...
Status: RESOLVED FIXED
Alias: None
Product: Elisa
Classification: Applications
Component: general (other bugs)
Version First Reported In: 22.12.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Matthieu Gallien
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-26 18:56 UTC by P. Förster
Modified: 2024-08-27 15:01 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 24.08.1
Sentry Crash Report:


Attachments
Party Mode: White text on a white background is not readable (301.58 KB, image/png)
2023-01-26 18:56 UTC, P. Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description P. Förster 2023-01-26 18:56:39 UTC
Created attachment 155677 [details]
Party Mode: White text on a white background is not readable

SUMMARY
Just look at the image.

STEPS TO REPRODUCE
1. Open Elisa
2. Add a radio station's background image that has white as part of it

OBSERVED RESULT
The name of the radio station and the text "Radio stations" is not properly visible (white text on white background).

EXPECTED RESULT
Either the text color should turn black or there should be a background behind the text. The main point is that the text is readable, regardless of how to achieve that.

SOFTWARE/OS VERSIONS
Operating System: EndeavourOS
KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8
Kernel Version: 6.1.8-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 12 × Intel® Core™ i7-10710U CPU @ 1.10GHz
Memory: 15,3 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics
Comment 1 Nate Graham 2023-01-27 17:45:34 UTC
The background is supposed to be darkened to prevent this situation. Judging from the screenshot, something is quite wrong with the background in general.

Can you make this happen when playing a music file that has album art with wqite elements in it, or does it only happen with radios?
Comment 2 P. Förster 2023-01-27 18:57:50 UTC
It doesn't seem to happen when playing local music. And yes, it looks like the background is darkened.

Is it possible that transparency causes this issue? In the example screenshot https://upload.wikimedia.org/wikipedia/en/thumb/0/05/The_Heart_Network_logo.svg/2880px-The_Heart_Network_logo.svg.png is used as an image which is full of transparency.
Comment 3 Bug Janitor Service 2024-08-26 12:14:53 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/elisa/-/merge_requests/613
Comment 4 Nate Graham 2024-08-27 14:53:05 UTC
Git commit aa93aceb118ac5b63f35d711fffd9708fc71c6db by Nate Graham, on behalf of Christoph Wolk.
Committed on 27/08/2024 at 14:48.
Pushed by ngraham into branch 'master'.

HeaderBar: set background image background

The HeaderBar uses a blur and lightness transformation applied to the
cover image as its background, which yields a dark-ish image suitable
for dark-theme foreground colors while being visually appealing and
reminiscent of the album cover. It currently does not take transparent
parts of the image into account, which are unaffected by the lightness
transformation and directly show the (usually hidden) background behind
the background, which is a solid color determined by the loaded theme.
With light themes, this can cause white text to be displayed on a white
background, which is not readable.

This change explicitly puts a Kirigami.Theme.backgroundColor rectangle
behind the image, before subjecting it to the transformation, so proper
lightness reduction is performed, yielding an effect similar to that for
a mostly white album cover on light themes.

M  +6    -0    src/qml/HeaderBar.qml
M  +1    -0    src/qml/ImageWithFallback.qml

https://invent.kde.org/multimedia/elisa/-/commit/aa93aceb118ac5b63f35d711fffd9708fc71c6db
Comment 5 Nate Graham 2024-08-27 15:01:21 UTC
Git commit e56e239800599948985d8e29465e7d506e2c310c by Nate Graham.
Committed on 27/08/2024 at 14:53.
Pushed by ngraham into branch 'release/24.08'.

HeaderBar: set background image background

The HeaderBar uses a blur and lightness transformation applied to the
cover image as its background, which yields a dark-ish image suitable
for dark-theme foreground colors while being visually appealing and
reminiscent of the album cover. It currently does not take transparent
parts of the image into account, which are unaffected by the lightness
transformation and directly show the (usually hidden) background behind
the background, which is a solid color determined by the loaded theme.
With light themes, this can cause white text to be displayed on a white
background, which is not readable.

This change explicitly puts a Kirigami.Theme.backgroundColor rectangle
behind the image, before subjecting it to the transformation, so proper
lightness reduction is performed, yielding an effect similar to that for
a mostly white album cover on light themes.


(cherry picked from commit aa93aceb118ac5b63f35d711fffd9708fc71c6db)

Co-authored-by: Christoph Wolk <christoph.wolk@gmx.de>

M  +6    -0    src/qml/HeaderBar.qml
M  +1    -0    src/qml/ImageWithFallback.qml

https://invent.kde.org/multimedia/elisa/-/commit/e56e239800599948985d8e29465e7d506e2c310c