For some reason I can't load my PNG file into a wxImage object.
I do this:
Code: Select all
wxImage image( wxT("overlay1.png") );
assert( image.IsOk() );
I'm using the latest stable version of wxWidgets as of about 2 or 3 days ago.
Code: Select all
wxImage image( wxT("overlay1.png") );
assert( image.IsOk() );
Well that's stupid. The class documentation doesn't even mention this. Sigh. Why do the exceptions not tell me this? They should say, "Invalid format. Did you call wxInitAllImageHandlers()?"stevelam wrote:Do you call wxImage::AddHandler(wxPNGHandler) or wxInitAllImageHandlers? If not you will need to as they initialise support for various image handlers. I think the reason BMPs are working is because that handler is added by default