mirror of
https://github.com/fltk/fltk.git
synced 2026-06-01 06:14:28 +08:00
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:
+7
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user