We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7826b6b commit eac8e9dCopy full SHA for eac8e9d
editor/scene/sprite_frames_editor_plugin.cpp
@@ -544,7 +544,11 @@ bool SpriteFramesEditor::_matches_background_color(const Color &p_background_col
544
545
Size2i SpriteFramesEditor::_estimate_sprite_sheet_size(const Ref<Texture2D> p_texture) {
546
Ref<Image> image = p_texture->get_image();
547
- Size2i size = p_texture->get_size();
+ if (image->is_compressed()) {
548
+ image = image->duplicate();
549
+ ERR_FAIL_COND_V(image->decompress() != OK, p_texture->get_size());
550
+ }
551
+ Size2i size = image->get_size();
552
553
Color assumed_background_color = image->get_pixel(0, 0);
554
Size2i sheet_size;
0 commit comments