On 11.02.2012 05:00, mattes wrote: > Rainer and Edzard, > thanx for the inspiration. I really prefer the XPM format. (expect the > downside it is not compressed ;-( ) > > The best solution in my case was to combine both of your ideas. > So i expanded Fl_XPM_image and added the functionality to pass > a pointer for the XPM image data. > > One easy step away by replacing fgets() with 'memgets()'.
But that's not necessary. Fl_Pixmap is doing that for you. <http://www.fltk.org/doc-1.3/classFl__Pixmap.html> <http://www.fltk.org/doc-1.3/classFl__Pixmap.html#a06c20a8a5ae2c0209d733599090aec3a> "The constructors create a new pixmap from the specified XPM data." > Maybe its useful for 1.3 too. Fl_Pixmap is available for 1.1 and 1.3 (and probably earlier). Side note: this is AFAIK in the core library, so you don't need the additional fltk_images lib. Albrecht _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

