Page 1 of 1

wxCrafter Bitmap File Format

Posted: Mon Aug 02, 2021 8:51 pm
by Netzschleicher

Hello together,

can anyone tell me what File Formats for Setting Bitmaps in wxCrafter can i use. On setting a png-File i get an Error like this:

18:50:11: Unknown image data format.
18:50:11: XRC error: cannot create bitmap from "Ui_MainWindow_bitmaps.cpp$Bitmaps_appiconsmall.png"

The png-File is an Icon downloaded from free Icon-Set.

Greetings
Netzschleicher


Re: wxCrafter Bitmap File Format

Posted: Wed Aug 11, 2021 2:34 pm
by eranif

Make sure you enable the PNGHandler in wxWidgets

You need to add a call similar to this somewhere in your code:

Code: Select all

    wxXmlResource::Get()->InitAllHandlers();
    wxImage::AddHandler(new wxPNGHandler);

Prefereably, in your wxApp subclass OnInit method