Refactor fluid: make fl_write_png() public

The new function fl_write_png() was moved to its own file and is now
publicly available ("exported") so other programs can use it.

This function was used in fluid to write a window screenshot (.png)
together with a template (.fl) to preferences storage.
This commit is contained in:
Albrecht Schlosser
2021-11-09 19:55:35 +01:00
parent 5c5244b162
commit 500e470d39
6 changed files with 157 additions and 26 deletions
+7 -1
View File
@@ -1,7 +1,7 @@
//
// PNG image header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
// Copyright 1998-2021 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -37,4 +37,10 @@ private:
void load_png_(const char *name_png, const unsigned char *buffer_png, int datasize);
};
// Support functions to write PNG image files (since 1.4.0)
FL_EXPORT int fl_write_png(const char *filename, int w, int h, int d, const unsigned char *pixels);
FL_EXPORT int fl_write_png(const char *filename, Fl_RGB_Image *img);
#endif