That was a long (as in loooong) thread about this, and several folk (but mainly me, to be honest) posted examples using Fl_Offscreen and similar - an example capturing the contents of a Fl_Group derived widget was here:
http://www.fltk.org/newsgroups.php?gfltk.general+v:27400 Another, grabbing random drawing to an offscreen in a scroll was here: http://www.fltk.org/newsgroups.php?gfltk.general+v:27381 (that's Greg's cleaned up version of my original buggy posting...) I'm not sure that you need the Fl_RGB_Image at all - once you read back the RGB data from the offscreen, that should be basically it, I think? You can just dump that data to libpng and you are good to go. Also, I'm fairly sure the offscreen is RGB rather than RGBA, so your dimensions may be wrong? Other than that, I'm not sure what to suggest - I'm on a laptop, far from any useful tools rights now so can't try your example out . _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

