summaryrefslogtreecommitdiff
path: root/FL/Fl_PNG_Image.H
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2021-11-09 19:55:35 +0100
committerAlbrecht Schlosser <albrechts.fltk@online.de>2021-11-09 20:36:23 +0100
commit500e470d392a547e6b72ac3fec92e0cd638c0d2f (patch)
tree7e308cfe1aaa4881ac75fdafeffe6bc9518efd62 /FL/Fl_PNG_Image.H
parent5c5244b1622561809173cbfc41fa9c1290d55fe2 (diff)
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.
Diffstat (limited to 'FL/Fl_PNG_Image.H')
-rw-r--r--FL/Fl_PNG_Image.H8
1 files changed, 7 insertions, 1 deletions
diff --git a/FL/Fl_PNG_Image.H b/FL/Fl_PNG_Image.H
index b0bd92ffa..21a01d16b 100644
--- a/FL/Fl_PNG_Image.H
+++ b/FL/Fl_PNG_Image.H
@@ -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