diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2020-10-20 23:25:58 +0200 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2020-10-20 23:52:45 +0200 |
commit | 0209e3790e4ab984b811f2994947ae71eef69b82 (patch) | |
tree | 80629af927952617cf9e4a849a55e2a49ac7bdde /modules/tga | |
parent | c77466b2761f28655fa98040e9e92b63e59faa7d (diff) |
Add `Image.load_bmp_from_buffer()` for run-time BMP image loading
This partially addresses
https://github.com/godotengine/godot-proposals/issues/676.
Diffstat (limited to 'modules/tga')
-rw-r--r-- | modules/tga/image_loader_tga.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/tga/image_loader_tga.cpp b/modules/tga/image_loader_tga.cpp index 1475d24792..a4a4561fc6 100644 --- a/modules/tga/image_loader_tga.cpp +++ b/modules/tga/image_loader_tga.cpp @@ -313,9 +313,9 @@ void ImageLoaderTGA::get_recognized_extensions(List<String> *p_extensions) const p_extensions->push_back("tga"); } -static Ref<Image> _tga_mem_loader_func(const uint8_t *p_png, int p_size) { +static Ref<Image> _tga_mem_loader_func(const uint8_t *p_tga, int p_size) { FileAccessMemory memfile; - Error open_memfile_error = memfile.open_custom(p_png, p_size); + Error open_memfile_error = memfile.open_custom(p_tga, p_size); ERR_FAIL_COND_V_MSG(open_memfile_error, Ref<Image>(), "Could not create memfile for TGA image buffer."); Ref<Image> img; img.instance(); |