summaryrefslogtreecommitdiff
path: root/core/io
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-03-18 14:29:58 +0100
committerGitHub <noreply@github.com>2022-03-18 14:29:58 +0100
commit5c8bd6fd71ac289415f0ff670442cd52bdc0d52b (patch)
treef2b2b3c3e1f1d67b1df414d08f054c2f1f8c8331 /core/io
parentda26fcc91a5643d592067d44d6cace34295fadda (diff)
parentf19cd44346a68a649cabfe85cc3ba7a44ceb0ca4 (diff)
Merge pull request #58233 from bruvzg/gde_ts
Diffstat (limited to 'core/io')
-rw-r--r--core/io/image.cpp4
-rw-r--r--core/io/image.h16
2 files changed, 10 insertions, 10 deletions
diff --git a/core/io/image.cpp b/core/io/image.cpp
index 766c84bdbe..5376b78a89 100644
--- a/core/io/image.cpp
+++ b/core/io/image.cpp
@@ -3112,8 +3112,8 @@ void Image::_bind_methods() {
ClassDB::bind_method(D_METHOD("generate_mipmaps", "renormalize"), &Image::generate_mipmaps, DEFVAL(false));
ClassDB::bind_method(D_METHOD("clear_mipmaps"), &Image::clear_mipmaps);
- ClassDB::bind_method(D_METHOD("create", "width", "height", "use_mipmaps", "format"), &Image::_create_empty);
- ClassDB::bind_method(D_METHOD("create_from_data", "width", "height", "use_mipmaps", "format", "data"), &Image::_create_from_data);
+ ClassDB::bind_method(D_METHOD("create", "width", "height", "use_mipmaps", "format"), &Image::create_empty);
+ ClassDB::bind_method(D_METHOD("create_from_data", "width", "height", "use_mipmaps", "format", "data"), &Image::create_from_data);
ClassDB::bind_method(D_METHOD("is_empty"), &Image::is_empty);
diff --git a/core/io/image.h b/core/io/image.h
index 53bfa0881f..39c700565b 100644
--- a/core/io/image.h
+++ b/core/io/image.h
@@ -155,14 +155,6 @@ protected:
static void _bind_methods();
private:
- void _create_empty(int p_width, int p_height, bool p_use_mipmaps, Format p_format) {
- create(p_width, p_height, p_use_mipmaps, p_format);
- }
-
- void _create_from_data(int p_width, int p_height, bool p_use_mipmaps, Format p_format, const Vector<uint8_t> &p_data) {
- create(p_width, p_height, p_use_mipmaps, p_format, p_data);
- }
-
Format format = FORMAT_L8;
Vector<uint8_t> data;
int width = 0;
@@ -289,6 +281,14 @@ public:
Vector<uint8_t> save_png_to_buffer() const;
Error save_exr(const String &p_path, bool p_grayscale) const;
+ void create_empty(int p_width, int p_height, bool p_use_mipmaps, Format p_format) {
+ create(p_width, p_height, p_use_mipmaps, p_format);
+ }
+
+ void create_from_data(int p_width, int p_height, bool p_use_mipmaps, Format p_format, const Vector<uint8_t> &p_data) {
+ create(p_width, p_height, p_use_mipmaps, p_format, p_data);
+ }
+
/**
* create an empty image
*/