greetings,

my app needs a logo but i dont want to distribute .png 
files (app should stay a single executable).

so i found this: 
http://wiki.wxwidgets.org/Embedding_PNG_Images
and used bin2c.c to convert my .png to a C vector like:

static unsigned char myimage_png[] = {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 
0x00, 0x0d, // ...
};

the image type is:
PNG image data, 128 x 128, 8-bit/color RGBA, non-interlaced

in my code i load the data like this:

Fl_RGB_Image* logo;
logo = new Fl_RGB_Image(l128_png, 128, 128, 4);

and i have added a box with:
logobox->image(logo);

i also call:
Fl::visual(FL_RGB);
fl_register_images();

before anything is being drawn.

however, the image is totally distorted, nothing like my 
logo looks like.

i have also tried to load the vector with D=3. it looks 
different but also totally wrong.

any ideas?

Thank you,
JanE
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to