Bug 350541 - PNG alpha channel is ignored [patch]
Summary: PNG alpha channel is ignored [patch]
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-DImg-PNG (show other bugs)
Version: 4.11.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-23 11:08 UTC by Rafael Linux User
Modified: 2017-08-01 20:26 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.13.0
Sentry Crash Report:


Attachments
Our friend (40.46 KB, image/png)
2015-07-31 12:09 UTC, Rafael Linux User
Details
Colour dices (215.81 KB, image/png)
2015-07-31 12:11 UTC, Rafael Linux User
Details
A good example with levels of opacity (82.46 KB, image/png)
2015-07-31 12:16 UTC, Rafael Linux User
Details
alphathumbs.png (159.95 KB, image/png)
2015-07-31 19:19 UTC, Maik Qualmann
Details
checkerboard.png (86.69 KB, image/png)
2015-08-04 06:12 UTC, Maik Qualmann
Details
checkerboard2.png (76.23 KB, image/png)
2015-08-06 16:53 UTC, Maik Qualmann
Details
checkerboard.patch (1.15 KB, patch)
2015-08-06 16:53 UTC, Maik Qualmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Linux User 2015-07-23 11:08:08 UTC
When showing thumbnails of PNG with alpha channel to mask areas of picture, digikam ignore it.

Reproducible: Always

Steps to Reproduce:
1.Create a PNG with alpha channel and save with it
2.Show that PNG thumbnail on digikam


Actual Results:  
Whole PNG picture is showed.

Expected Results:  
Do not show alpha areas from image on thumbnails, like Gwenview does.

User can't distinguish between PNG images with and w/o alpha channel, so he need to preview it.
Comment 1 caulier.gilles 2015-07-24 08:53:32 UTC
Which version of digiKam do you use ?

Can you share some PNG images with Alpha ?

Gilles Caulier
Comment 2 Rafael Linux User 2015-07-31 11:38:08 UTC
Sorry for the delay.

digikam 4.11.0
Comment 3 Rafael Linux User 2015-07-31 12:09:41 UTC
Created attachment 93810 [details]
Our friend
Comment 4 Rafael Linux User 2015-07-31 12:11:22 UTC
Created attachment 93811 [details]
Colour dices
Comment 5 Rafael Linux User 2015-07-31 12:16:16 UTC
Created attachment 93812 [details]
A good example with levels of opacity
Comment 6 Maik Qualmann 2015-07-31 19:19:23 UTC
Created attachment 93823 [details]
alphathumbs.png

DigiKam used as well as Dolphin a white background. Gwenview uses the background color. I think it is not difficult to change this, but somehow I find the white background better. What do you think Gilles?

Maik
Comment 7 caulier.gilles 2015-07-31 19:25:02 UTC
yes the code relevant is in icon-view model-view.

Internally, we use PGF to store thumbs. PGF support Alpha, so, it's not a problem in this side. Look in core/libs/threadimageio/pgfutils.cpp to be sure. There are code PGF <->QImage conversion. DB store PGF as RAW data.

In core/tests, there is also a CLI tool to check PGF conversion with image samples.

Gilles
Comment 8 Rafael Linux User 2015-08-03 18:54:05 UTC
Hi Maik

From a photographer/designer viewpoint, we need to distinguish at a glance alpha masked images from not alpha masked (cause digikam can't distinguish one from each other in a search).
Comment 9 Maik Qualmann 2015-08-04 06:12:26 UTC
Created attachment 93881 [details]
checkerboard.png

Hi Rafael

Depending on the color scheme, we have different background colors. What do you think over the checkerboard in the background, as in the screenshot?

Maik
Comment 10 Rafael Linux User 2015-08-04 08:44:01 UTC
I think is a perfect way to show the thumbs, cause you can see if the object is or is not centered.

;)
Comment 11 Maik Qualmann 2015-08-06 16:53:14 UTC
Created attachment 93918 [details]
checkerboard2.png

I once made a brighter checkerboard. What is better?

Maik
Comment 12 Maik Qualmann 2015-08-06 16:53:59 UTC
Created attachment 93919 [details]
checkerboard.patch

Here is the patch for the checkerboard.

Maik
Comment 13 Rafael Linux User 2015-08-07 09:34:49 UTC
I think that bright is perfect.

Thank you. Finally I will not need to open each PNG file to see how it will be showed.

;)
Comment 14 Maik Qualmann 2015-08-08 16:57:45 UTC
Git commit b6ef05138531969b771bff59e750aa82340dd268 by Maik Qualmann.
Committed on 08/08/2015 at 16:50.
Pushed by mqualmann into branch 'master'.

has the thumbnail a alpha channel, is a checkerboard background used
FIXED-IN: 4.13.0

M  +2    -1    NEWS
M  +10   -1    libs/threadimageio/thumbnailcreator.cpp

http://commits.kde.org/digikam/b6ef05138531969b771bff59e750aa82340dd268
Comment 15 Maik Qualmann 2015-08-11 06:09:55 UTC
Git commit 80f5fa781ddcf3e9033f0ef405d0834a0b74ffe0 by Maik Qualmann.
Committed on 11/08/2015 at 06:03.
Pushed by mqualmann into branch 'frameworks'.

backport commit #b6ef05138531969b771bff59e750aa82340dd268 from git/master to frameworks branch

M  +10   -1    libs/threadimageio/thumbnailcreator.cpp

http://commits.kde.org/digikam/80f5fa781ddcf3e9033f0ef405d0834a0b74ffe0