On 07/16/11 14:57, Carlos Luna wrote:
>>      ALSO: perhaps it's no longer needed, but I thought FLTK apps
>>      that used the FLTK image library had to call:
>>
>> fl_register_images();
>>
>>      ..at the top of main() to ensure the lib properly initialized.
>>      So you should try adding that as the first thing in your main().
> 
> Ok, added the
> fl_register_images();
> line and everything works OK so far. What exactly does it achieve?

        I assume it does some kind of library initialization.

        I've just always remembered the docs for image functions used
        to say to call it, so I always do.

        I found a reference in Fl_Shared_Image:
        http://fltk.org/doc-1.3/classFl__Shared__Image.html#details
        
http://fltk.org/doc-1.3/Fl__Shared__Image_8H.html#a5c361cb2fdac6c22f6259f5e044657f4

        ..but this might only be needed by the Fl_Shared_Image class,
        and related classes.

        So in fact, I'm not sure if you'd need to call it just to use
        the Fl_PNG_Image class, as the docs for that particular class make
        no mention of it, and neither do the other classes it derives from
        (Fl_RGB_Image, Fl_Image), eg:
        http://fltk.org/doc-1.3/classFl__PNG__Image.html
        http://fltk.org/doc-1.3/classFl__RGB__Image.html
        http://fltk.org/doc-1.3/classFl__Image.html

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

Reply via email to