| Summary: |
8bit JXL images with alpha have no transparency [patch] |
| Product: |
[Applications] digikam
|
Reporter: |
Eugene Vert <eugene.a.vert> |
| Component: |
Plugin-DImg-QImage | Assignee: |
Digikam Developers <digikam-bugs-null> |
| Status: |
RESOLVED
FIXED
|
|
|
| Severity: |
normal
|
CC: |
caulier.gilles
|
| Priority: |
NOR
|
|
|
| Version First Reported In: |
8.7.0 | |
|
| Target Milestone: |
--- | |
|
| Platform: |
Compiled Sources | |
|
| OS: |
Linux | |
|
|
Latest Commit:
|
https://invent.kde.org/graphics/digikam/-/commit/fd83243e261282500a73feac8f72d0209a4ba8e0
|
Version Fixed/Implemented In:
|
8.7.0
|
|
Sentry Crash Report:
|
|
| |
SUMMARY QImage plugin ignores transparency of 8 bit images with alpha channel. STEPS TO REPRODUCE 1. Add JXL 8 bit image with transparency to library 2. Open the image with digiKam/showFoto SOFTWARE/OS VERSIONS Linux: openSUSE Tumbleweed KDE Plasma Version: 6.3.4 KDE Frameworks Version: 6.12.0 Qt Version: 6.8.2 ADDITIONAL INFORMATION From Qt 5.15 documentation: "QColor::QColor(QRgb color) Constructs a color with the value color. The alpha component is ignored and set to solid." Suggested patch: ```patch diff --git a/core/dplugins/dimg/qimage/dimgqimageloader_load.cpp b/core/dplugins/dimg/qimage/dimgqimageloader_load.cpp index 705597d8d..83491f38e 100644 --- a/core/dplugins/dimg/qimage/dimgqimageloader_load.cpp +++ b/core/dplugins/dimg/qimage/dimgqimageloader_load.cpp @@ -146,7 +146,7 @@ bool DImgQImageLoader::load(const QString& filePath, DImgLoaderObserver* const o for (uint i = 0 ; i < w * h ; ++i) { - QColor color(*sptr); + QColor color = QColor::fromRgba(*sptr); dptr[0] = color.blue(); dptr[1] = color.green(); dptr[2] = color.red(); ```