diff options
Diffstat (limited to 'core/io/image.cpp')
-rw-r--r-- | core/io/image.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/io/image.cpp b/core/io/image.cpp index 5498b448d7..4b1188ad47 100644 --- a/core/io/image.cpp +++ b/core/io/image.cpp @@ -3312,7 +3312,7 @@ uint8_t *Image::ptrw() { return data.ptrw(); } -int64_t Image::data_size() const { +int64_t Image::get_data_size() const { return data.size(); } @@ -3427,6 +3427,7 @@ void Image::_bind_methods() { ClassDB::bind_method(D_METHOD("has_mipmaps"), &Image::has_mipmaps); ClassDB::bind_method(D_METHOD("get_format"), &Image::get_format); ClassDB::bind_method(D_METHOD("get_data"), &Image::get_data); + ClassDB::bind_method(D_METHOD("get_data_size"), &Image::get_data_size); ClassDB::bind_method(D_METHOD("convert", "format"), &Image::convert); @@ -3443,7 +3444,10 @@ 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); +#ifndef DISABLE_DEPRECATED ClassDB::bind_static_method("Image", D_METHOD("create", "width", "height", "use_mipmaps", "format"), &Image::create_empty); +#endif + ClassDB::bind_static_method("Image", D_METHOD("create_empty", "width", "height", "use_mipmaps", "format"), &Image::create_empty); ClassDB::bind_static_method("Image", D_METHOD("create_from_data", "width", "height", "use_mipmaps", "format", "data"), &Image::create_from_data); ClassDB::bind_method(D_METHOD("set_data", "width", "height", "use_mipmaps", "format", "data"), &Image::set_data); |