From 500e470d392a547e6b72ac3fec92e0cd638c0d2f Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Tue, 9 Nov 2021 19:55:35 +0100 Subject: 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. --- FL/Fl_PNG_Image.H | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'FL/Fl_PNG_Image.H') 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 -- cgit v1.2.3