Didn't know where to put this... Topic is solved

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
szevvy
In need of some credit
In need of some credit
Posts: 6
Joined: Fri Feb 02, 2007 12:25 am

Didn't know where to put this...

Post by szevvy »

The latest docs - specifically http://www.wxwidgets.org/manuals/2.8.0/wx_wximage.html don't seem to have been updated with a new feature. That file says that "Note that currently only images loaded from PNG files with transparency information will have an alpha channel but alpha support will be added to the other formats as well (as well as support for saving images with alpha channel which also isn't implemented)."

Not true. I am saving wxBitmaps with alpha channels out to PNG files and they're saving out with an alpha channel intact. I've only tested with alpha being either 0 or 0xFF, so I'm not sure if it's saving an alpha channel proper or a mask, but the fact is that saving images with an alpha channel to PNGs is implemented.
krzysiek_t
Earned a small fee
Earned a small fee
Posts: 23
Joined: Tue Jul 11, 2006 1:36 pm
Location: Poland, Warsaw
Contact:

Post by krzysiek_t »

I suppose wx contributors often don't have enough time to do all: working, developing wx-widgets, testing it, documenting...
Jorg
Moderator
Moderator
Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands
Contact:

Post by Jorg »

Please post a bug report at SF.net

http://sf.net/projects/wxwindows

Or else it will be forgotten again.
- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
Scorpion
Knows some wx things
Knows some wx things
Posts: 37
Joined: Sun Mar 18, 2007 7:26 am
Location: United States

File formatting brief:

Post by Scorpion »

You essentially converted a bitmap into a .png which is not a bitmap with transparency. When you cropped the bitmap and converted the image file into .png with alpha channels the .png parser took the image data that was translated by wxWidgets services and saved the file with the transparency.

that was not a bitmap with transparency. PNG, GIF, and Bitmap all have formats with alpha and no alpha. Bitmap with alpha images are monsters and hell on those unfamiliar with the format. PNG and GIF are a walk in the park by comparison.

You only did an image conversion, you didn't produce a bitmap with alpha.

Be rest assured that if the wxDevHeads said that bitmap with alpha will be available it will be. I have tracked their record and they have produced everything they have ever promised unless there was a real good reason.
Win 2K Pro
XP Home
Ubuntu (Ndiswrapper Deluxe Pro Ultra Grade)
Palm 3.5 (Still Alive and Kickin')
Playstation Portable, and Too Much Coffee
I can feel my skin crawling...icky!
Post Reply