https://bugs.kde.org/show_bug.cgi?id=505609

            Bug ID: 505609
           Summary: 8bit JXL images with alpha have no transparency
    Classification: Applications
           Product: digikam
      Version First 8.7.0
       Reported In:
          Platform: Compiled Sources
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: DImg-Plugins
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

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();
```

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to