Bug 71317

Summary: Images are not shown correctly
Product: [Frameworks and Libraries] kdelibs Reporter: Albert Astals Cid <aacid>
Component: qtAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Example image

Description Albert Astals Cid 2003-12-27 18:32:42 UTC
Version:           v1.00 (using KDE 3.1.94 (CVS >= 20031206), compiled sources)
Compiler:          gcc version 3.3.1 (Mandrake Linux 9.2 3.3.1-2mdk)
OS:          Linux (i686) release 2.4.22-21mdk

Images seem to be loaded incorrectly and don't show up fine in the game.

I'm using qt 3.3 beta1
Comment 1 Albert Astals Cid 2003-12-27 18:33:46 UTC
Created attachment 3851 [details]
Example image
Comment 2 Waldo Bastian 2004-02-16 22:59:38 UTC
The problem is caused by lines 1008-1013 of qpixmap_x11.cpp in Qt 3.3:
// make sure image.color(0) == color0 (white) and image.color(1) == color1 (black)
if (image.color(0) == Qt::black.rgb() && image.color(1) == Qt::white.rgb()) {
    image.invertPixels();
    image.setColor(0, Qt::white.rgb());
    image.setColor(1, Qt::black.rgb());
}
Comment 3 Waldo Bastian 2004-02-17 12:21:02 UTC
CVS commit by waba: 

Fix mask to work with both Qt 3.2 & Qt 3.3 (BR71317)
CCMAIL: 71317-done@bugs.kde.org


  M +3 -3      arrow_mask.png   1.1.6.1
  M +2 -3      empty2_mask.png   1.1.6.1
  M +1 -1      empty_mask.png   1.1.6.1
  M +2 -5      game_over_mask.png   1.1.6.1
  M +1 -1      introabout_mask.png   1.1.6.1
  M +1 -5      piece_mask.png   1.1.6.1
  M +2 -2      star0_mask.png   1.1.6.1
  M +2 -2      star1_mask.png   1.1.6.1
  M +3 -3      star2_mask.png   1.1.6.1
  M +3 -3      star3_mask.png   1.1.6.1
  M +2 -2      star4_mask.png   1.1.6.1