On 19 Mar 2012, at 17:43, Edzard Egberts wrote:
> 
>> If you do go the offscreen route, the "solution" is to make the
>> offscreen current then use fl_read_image(...); to get the raw data.
> 
> There is no image, until now the software used only libfltk. For 
> creation of my plot-image I need to include libjpeg/libpng.


Sorry Edzard, you are still not understanding me...

What I am trying to say is that if you draw all the things you want to capture, 
into the fl_offscreen, then you can use fl_read_image() to get a pointer to the 
raw offscreen data, that you can then write out to a PNG or etc.

> Which fltk format can I use to get fl_offscreen data? By function I only 
> found a copy to screen.

Did you look at the earlier post I referred you to?

Once you have drawn your scene into the offscreen, you can just do...


  fl_begin_ofscreen(offs);

  char *data = fl_read_image(....);

  fl_end_offscreen();

  png_write(data, ...);

  etc.


That is what you were asking for, I think?



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

Reply via email to