|
|
Fl_Image doesn't have any link to the file or other resources. Fl_PNG_Image does an fopen() and a fclose().
So the following sequence (FLTK 1.4, Linux, installed PNG library) works:
Fl_Image *img; Fl_Image *imgc; img = new Fl_PNG_Image("folder.png"); imgc = img->copy(250, 250); delete img; FILE *imgF = fopen("folder.png", "wb"); fputc(0, imgF); fclose(imgF);
The file which was opened by Fl_PNG_Image is successfully clobbered by the subsequent fopen/fputc.
I have noticed that I am not allowed to update a file after I've opened it with Fl_PNG_Image.
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/ec37b80e-6892-4171-922e-87ed3655daf7n%40googlegroups.com.
[ Direct Link to Message ] | |
|
| |