diff --git a/core/image/image.cpp b/core/image/image.cpp index 74d5e2b..7f38daa 100644 --- a/core/image/image.cpp +++ b/core/image/image.cpp @@ -1685,6 +1685,9 @@ const uint8_t *Image::datar() const { uint8_t *Image::dataw() { return data.dataw(); } +int Image::get_data_size() const { + return data.size(); +} void Image::create(int p_width, int p_height, bool p_use_mipmaps, Format p_format) { ERR_FAIL_COND_MSG(p_width <= 0, "Image width must be greater than 0."); diff --git a/core/image/image.h b/core/image/image.h index 8585bdd..1958fc3 100644 --- a/core/image/image.h +++ b/core/image/image.h @@ -212,6 +212,7 @@ public: Vector get_data() const; const uint8_t* datar() const; uint8_t* dataw(); + int get_data_size() const; Image(); Image(int p_width, int p_height, bool p_use_mipmaps, Format p_format);