> Is there any other way doing it? I don't have to used jpeg.
> Could provide as well a raw bitmap (in rgb?). Its actually for a logo
> so it won't be very big.
You should consider to use xpm format, maybe using GIMP to create it out
of a jpeg. xpm is ASCII text and you can include it directly to your
code (#include "logo.xpm"). When you take a look to the xpm by text
editor, it must start like "static const char * pIcon_Xpm[] = {". If
there is only "char *" you should change ist to "static const char*"
because you will get rid of warnings. After including it, you can
display it using "Fl_Pixmap* mp_Pic= new Fl_Pixmap(pIcon_Xpm);" and
overwriting the draw() method:
void draw()
{
if (mp_Pic)
{
Fl_Image* Scale= mp_Pic->copy(w(), h());
Scale->draw(x(), y(), w(), h());
delete Scale;
}
else Fl_Box::draw();
}
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk