aboutsummaryrefslogtreecommitdiff
path: root/core/image.h
diff options
context:
space:
mode:
authorJuan Linietsky2014-11-13 00:53:12 -0300
committerJuan Linietsky2014-11-13 00:53:12 -0300
commitabbea4d945bbb1114570c3b6c7f649e01ca8ebb8 (patch)
treed2b131b32705bbcf118efa72d5d9a21618c1227e /core/image.h
parentd02953c5963ca080d26500ea8250e0632a80b234 (diff)
downloadgodot-abbea4d945bbb1114570c3b6c7f649e01ca8ebb8.tar.gz
godot-abbea4d945bbb1114570c3b6c7f649e01ca8ebb8.tar.zst
godot-abbea4d945bbb1114570c3b6c7f649e01ca8ebb8.zip
Diffstat (limited to 'core/image.h')
-rw-r--r--core/image.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/image.h b/core/image.h
index 0084a3616..f4c96703b 100644
--- a/core/image.h
+++ b/core/image.h
@@ -40,7 +40,9 @@
* Images can be loaded from a file, or registered into the Render object as textures.
*/
+class Image;
+typedef Error (*SavePNGFunc)(const String &p_path, Image& p_img);
class Image {
@@ -50,6 +52,8 @@ class Image {
};
public:
+ static SavePNGFunc save_png_func;
+
enum Format {
FORMAT_GRAYSCALE, ///< one byte per pixel, 0-255
FORMAT_INTENSITY, ///< one byte per pixel, 0-255
@@ -278,6 +282,7 @@ public:
DVector<uint8_t> get_data() const;
Error load(const String& p_path);
+ Error save_png(const String& p_path);
/**
* create an empty image