summaryrefslogtreecommitdiff
path: root/modules/bmp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/bmp')
-rw-r--r--modules/bmp/image_loader_bmp.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/bmp/image_loader_bmp.cpp b/modules/bmp/image_loader_bmp.cpp
index cc21ed28e8..681b3e74bc 100644
--- a/modules/bmp/image_loader_bmp.cpp
+++ b/modules/bmp/image_loader_bmp.cpp
@@ -156,7 +156,7 @@ Error ImageLoaderBMP::convert_to_image(Ref<Image> p_image,
if (p_color_buffer == nullptr || color_table_size == 0) { // regular pixels
- p_image->create(width, height, false, Image::FORMAT_RGBA8, data);
+ p_image->set_data(width, height, false, Image::FORMAT_RGBA8, data);
} else { // data is in indexed format, extend it
@@ -194,7 +194,7 @@ Error ImageLoaderBMP::convert_to_image(Ref<Image> p_image,
dest += 4;
}
- p_image->create(width, height, false, Image::FORMAT_RGBA8, extended_data);
+ p_image->set_data(width, height, false, Image::FORMAT_RGBA8, extended_data);
}
}
return err;