diff --git a/scene/resources/2d/tile_set.cpp b/scene/resources/2d/tile_set.cpp index 04b00b6bdbc..57cc4ad602e 100644 --- a/scene/resources/2d/tile_set.cpp +++ b/scene/resources/2d/tile_set.cpp @@ -5591,6 +5591,11 @@ Ref TileSetAtlasSource::_create_padded_image_texture(const Refis_compressed()) { + src_image = src_image->duplicate(); + Error err = src_image->decompress(); + ERR_FAIL_COND_V_MSG(err != OK, Ref(), "Unable to decompress image."); + } Size2 size = get_atlas_grid_size() * (texture_region_size + Vector2i(2, 2)); Ref image = Image::create_empty(size.x, size.y, false, src_image->get_format());