[wx-dev] [ wxwindows-Bugs-1816085 ] png under windows 98/2000 turn
black
SourceForge.net
noreply at sourceforge.net
Thu May 1 15:06:41 PDT 2008
Bugs item #1816085, was opened at 2007-10-18 21:15
Message generated for change (Comment added) made by moonkid
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1816085&group_id=9863
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: wxMSW specific
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: maxinuruguay (maxinuruguay)
Assigned to: Nobody/Anonymous (nobody)
Summary: png under windows 98/2000 turn black
Initial Comment:
Png shown by wxStaticBitmap will have the transparent parts turn black if any pixel in the png has an alpha value that is not 0 or 255. If all the pixels have 0 or 255, the transparency works fine. The workaround is to go into photoshop an insure that all the png files are free of pixels that have in between alpha values.
----------------------------------------------------------------------
Comment By: Christian Buhtz (moonkid)
Date: 2008-05-02 00:06
Message:
Logged In: YES
user_id=601949
Originator: NO
Please close the bug.
My last comment has nothing to do with this bug.
----------------------------------------------------------------------
Comment By: Christian Buhtz (moonkid)
Date: 2008-04-28 18:57
Message:
Logged In: YES
user_id=601949
Originator: NO
The bug is still there on WinXPSP2 with wxStaticBitmap and wxTreeCtrl
items, etc.
Please see this picture
<ftp://ftp.berlios.de/pub/blackfisk/logo_alpha.png>
In the background is a big blackfisk. That is the SVG-Version I created
with "Inkscape". The background is set to transparent (Inkscape display it
white).
In the right-top-corner you can see the exported PNG-file with the
transparent background (pink is transparent here because I setup the
viewing software that way). Each other SVG-viewing software (e.g. Opera)
display it correct with a transparent background.
Then I try to use the exported PNG as a icon in a wxStaticText and
"import" with this line.
wxwidgets:
wxBitmap(wxString::Format(_T("%s%s"), BF_GRAPHICDIR, _T("logo128.png")),
wxBITMAP_TYPE_PNG));
You can see the result in the right-middle in the picture. You see the
black background? Something is wrong here.
My workaround is to load the PNG-file in IrfanView (a picture-viewer on
Win32) and re-save it with setting the transparent colour explicite in the
saving-options.
Then it looks like the right-bottom picture.
What is wrong here in this chain? I am not sure but I think wx did
something different or wrong while loading a PNG then other PNG-viewers
does.
And I can say that storing transparency is handled different between
Inkscape and IrfanView.
________________
wxWdigets 2.9.x (SVN) build with MinGW as debug-dll on WinXPSP2
Code::Blocks as IDE
----------------------------------------------------------------------
Comment By: Steven Van Ingelgem (g00fy)
Date: 2007-12-07 09:49
Message:
Logged In: YES
user_id=569271
Originator: NO
I fixed this bug:
https://sourceforge.net/tracker/index.php?func=detail&aid=1761598&group_id=9863&atid=309863
----------------------------------------------------------------------
Comment By: deste (andreadestefani)
Date: 2007-12-07 09:46
Message:
Logged In: YES
user_id=1919278
Originator: NO
Thanks to maxinuruguay for submit this bug.
I want only to "update" this track and confirm what maxinuruguay have
already said. The problem with PNG alpha is present in win98/2000, not in
XP/Vista (don't know about MacOS and linux); the problem is present only
when use wxStaticBitmap (PNGs loaded in wxToolBar, or in wxMenu by
Menuitem->SetBitmap, or in wxListCtrl, works fine!).
Thanks to all wxDevs.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1816085&group_id=9863
More information about the wx-dev
mailing list