|
@@ -31,6 +31,7 @@
|
|
#include "export_plugin.h"
|
|
#include "export_plugin.h"
|
|
|
|
|
|
#include "core/config/project_settings.h"
|
|
#include "core/config/project_settings.h"
|
|
|
|
+#include "core/io/image_loader.h"
|
|
#include "editor/editor_node.h"
|
|
#include "editor/editor_node.h"
|
|
#include "editor/editor_paths.h"
|
|
#include "editor/editor_paths.h"
|
|
|
|
|
|
@@ -84,8 +85,10 @@ Error EditorExportPlatformWindows::_process_icon(const Ref<EditorExportPreset> &
|
|
f->seek(prev_offset);
|
|
f->seek(prev_offset);
|
|
}
|
|
}
|
|
} else {
|
|
} 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) {
|
|
for (size_t i = 0; i < sizeof(icon_size) / sizeof(icon_size[0]); ++i) {
|
|
int size = (icon_size[i] == 0) ? 256 : icon_size[i];
|
|
int size = (icon_size[i] == 0) ? 256 : icon_size[i];
|
|
|
|
|