FLTK doesnt include any image write routines that I know of,
but it does include the png and jpeg libraries, so you should
be able to use e.g. the png library's image write functions to
write the rgb pixels out of the FLTK image buffer, and write them
back to disk.
I /think/ the png library's functions, when linked into an
FLTK program, will be visible to the main application.
See the fltk/png/libpng-manual.txt for info on how to use
the PNG library functions, or the online docs at
http://www.libpng.org/
Perhaps someone has posted code doing this from within
FLTK before -- I can't recall. But likely you'll need the
Fl_Image methods data_w(), data_h(), d() and data()
for the image width, height, depth, and raw data (respectively)
to access the raw pixel data, and then pass that down to the
png library to open/write/close the png file.
Typically people use an image conversion tool like imagemagick
to convert one image file format to another.