From 072f6feabac70a6c4ed1a16f4e983bf31ad62d50 Mon Sep 17 00:00:00 2001 From: kobewi Date: Fri, 22 Jul 2022 20:06:19 +0200 Subject: Make some Image methods static --- platform/android/export/export_plugin.cpp | 2 +- platform/ios/export/export_plugin.cpp | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'platform') diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp index ef3b79b630..317f111202 100644 --- a/platform/android/export/export_plugin.cpp +++ b/platform/android/export/export_plugin.cpp @@ -1551,7 +1551,7 @@ String EditorExportPlatformAndroid::load_splash_refs(Ref &splash_image, R print_verbose("Creating splash background color image."); splash_bg_color_image.instantiate(); - splash_bg_color_image->create(splash_image->get_width(), splash_image->get_height(), false, splash_image->get_format()); + splash_bg_color_image->initialize_data(splash_image->get_width(), splash_image->get_height(), false, splash_image->get_format()); splash_bg_color_image->fill(bg_color); String processed_splash_config_xml = vformat(SPLASH_CONFIG_XML_CONTENT, bool_to_string(apply_filter)); diff --git a/platform/ios/export/export_plugin.cpp b/platform/ios/export/export_plugin.cpp index 74a57dc614..83b2012d3e 100644 --- a/platform/ios/export/export_plugin.cpp +++ b/platform/ios/export/export_plugin.cpp @@ -740,8 +740,7 @@ Error EditorExportPlatformIOS::_export_loading_screen_images(const Refresize(info.width, info.width / aspect_ratio); } } - Ref new_img = memnew(Image); - new_img->create(info.width, info.height, false, Image::FORMAT_RGBA8); + Ref new_img = Image::create_empty(info.width, info.height, false, Image::FORMAT_RGBA8); new_img->fill(boot_bg_color); _blend_and_rotate(new_img, img, false); err = new_img->save_png(p_dest_dir + info.export_name); @@ -755,8 +754,7 @@ Error EditorExportPlatformIOS::_export_loading_screen_images(const Ref img = memnew(Image); - img->create(info.width, info.height, false, Image::FORMAT_RGBA8); + Ref img = Image::create_empty(info.width, info.height, false, Image::FORMAT_RGBA8); img->fill(boot_bg_color); Ref img_bs; -- cgit v1.2.3