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
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 » Sat Feb 03, 2007 6:34 am

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.

Earned a small fee
Earned a small fee
Posts: 23
Joined: Tue Jul 11, 2006 1:36 pm
Location: Poland, Warsaw

Post by krzysiek_t » Thu Feb 22, 2007 12:05 pm

I suppose wx contributors often don't have enough time to do all: working, developing wx-widgets, testing it, documenting...

Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands

Post by Jorg » Thu Feb 22, 2007 12:28 pm

Please post a bug report at SF.net


Or else it will be forgotten again.
- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
Jorg's WasteBucket

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 » Thu Mar 22, 2007 1:54 am

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