diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-05-23 08:55:32 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-05-23 08:55:32 -0300 |
commit | d093b78f129568251ca508f7fcd65bea69350fd9 (patch) | |
tree | 97367375447c6ae5ab3341371a3a72a7c3261c51 /scene/resources/texture.cpp | |
parent | 6161e731d09fccaa6ccf103920305431638d2bd0 (diff) | |
download | redot-engine-d093b78f129568251ca508f7fcd65bea69350fd9.tar.gz |
Fix stex import into black textures when lossless and lossy are selected, closes #8801
Diffstat (limited to 'scene/resources/texture.cpp')
-rw-r--r-- | scene/resources/texture.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp index ff80aa4284..6b9407be8c 100644 --- a/scene/resources/texture.cpp +++ b/scene/resources/texture.cpp @@ -406,7 +406,7 @@ Image::Format StreamTexture::get_format() const { return format; } -Error StreamTexture::_load_data(const String &p_path, int &tw, int &th, int &flags, Ref<Image> image, int p_size_limit) { +Error StreamTexture::_load_data(const String &p_path, int &tw, int &th, int &flags, Ref<Image> &image, int p_size_limit) { ERR_FAIL_COND_V(image.is_null(), ERR_INVALID_PARAMETER); @@ -502,6 +502,7 @@ Error StreamTexture::_load_data(const String &p_path, int &tw, int &th, int &fla memdelete(f); ERR_FAIL_COND_V(img->empty(), ERR_FILE_CORRUPT); } + total_size += img->get_data().size(); mipmap_images.push_back(img); |