Bug 274394

Summary: Dolphin, Dolphin kpart, and the file dialog render previews for some transparent png images on black background.
Product: [Frameworks and Libraries] kio Reporter: Nikita Skovoroda <chalkerx>
Component: thumbnailAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: peter.penz19
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 4.7.0
Attachments: Screenshot of the bug.
Bad image (this one is rendered on black background).
orig.png (good image, this one is ok)

Description Nikita Skovoroda 2011-05-29 01:50:28 UTC
Created attachment 60424 [details]
Screenshot of the bug.

Version:           unspecified (using Devel) 
OS:                Linux



Reproducible: Always

Steps to Reproduce:
0) You should be using light color scheme, default one is good.
1) Download the two provided images, place them in some (new) folder.
2) Open them in gwenview, KolourPaint, or any other image viewer. Confirm that they are equal.
3) Open dolphin with image previews turned on, go to that folder.

Actual Results:  
Dolphin shows different images. One of them is rendered on black background, instead of transparent. See screenshot.

Expected Results:  
Two equal images, no black color.

*) That happens for Dolphin, Dolphin kpart, and the file dialog.
*) KDE 4.6.3 on two different Kububtu machines was also affected.
*) optipng.png is a result of „optipng -o9“ command on orig.png.
*) That (original, good) file is a testcase created with KolourPaint. It also happens on real images with transparency (if you use optipng on them).
Comment 1 Nikita Skovoroda 2011-05-29 01:51:06 UTC
Created attachment 60425 [details]
Bad image (this one is rendered on black background).
Comment 2 Nikita Skovoroda 2011-05-29 01:52:24 UTC
Created attachment 60426 [details]
orig.png (good image, this one is ok)
Comment 3 Nikita Skovoroda 2011-05-29 01:59:22 UTC
Forgot to mention, i have KDE 4.7.beta1 on ArchLinux.

But it also happens with 4.6.3 on two different  Kubuntu machines.
Comment 4 Nikita Skovoroda 2011-05-29 02:30:35 UTC
Looks like the problem lies in image depth. Optimized images with depth 32 are ok, while with any lower depth — rendered on black background.
Comment 5 Christoph Feck 2011-06-14 13:55:13 UTC
Git commit 31f8be7ae74a5e91501fa885977d96961636d1d9 by Christoph Feck.
Committed on 14/06/2011 at 13:55.
Pushed by cfeck into branch 'master'.

Do not discard alpha component of palettized images

BUG: 274394
FIXED-IN: 4.7.0

M  +1    -1    kioslave/thumbnail/imagecreator.cpp     

http://commits.kde.org/kde-runtime/31f8be7ae74a5e91501fa885977d96961636d1d9
Comment 6 Nikita Skovoroda 2011-06-14 23:59:21 UTC
Thank you :-).