diff options
Diffstat (limited to 'platform/windows')
-rw-r--r-- | platform/windows/export/export_plugin.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/platform/windows/export/export_plugin.cpp b/platform/windows/export/export_plugin.cpp index bfd40e1c9c..f04177d79a 100644 --- a/platform/windows/export/export_plugin.cpp +++ b/platform/windows/export/export_plugin.cpp @@ -31,6 +31,7 @@ #include "export_plugin.h" #include "core/config/project_settings.h" +#include "core/io/image_loader.h" #include "editor/editor_node.h" #include "editor/editor_paths.h" @@ -84,8 +85,10 @@ Error EditorExportPlatformWindows::_process_icon(const Ref<EditorExportPreset> & f->seek(prev_offset); } } else { - Ref<Image> src_image = Image::load_from_file(p_src_path); - ERR_FAIL_COND_V(src_image.is_null() || src_image->is_empty(), ERR_CANT_OPEN); + Ref<Image> src_image; + src_image.instantiate(); + err = ImageLoader::load_image(p_src_path, src_image); + ERR_FAIL_COND_V(err != OK || src_image->is_empty(), ERR_CANT_OPEN); for (size_t i = 0; i < sizeof(icon_size) / sizeof(icon_size[0]); ++i) { int size = (icon_size[i] == 0) ? 256 : icon_size[i]; |