Merge pull request #42947 from Calinou/image-load-bmp-from-buffer

Add `Image.load_bmp_from_buffer()` for run-time BMP image loading
This commit is contained in:
Rémi Verschelde 2020-11-07 16:38:09 +01:00 committed by GitHub
commit 329d2c1ced
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 45 additions and 6 deletions

View file

@ -346,6 +346,16 @@
Loads an image from file [code]path[/code]. See [url=https://docs.godotengine.org/en/latest/getting_started/workflow/assets/importing_images.html#supported-image-formats]Supported image formats[/url] for a list of supported image formats and limitations.
</description>
</method>
<method name="load_bmp_from_buffer">
<return type="int" enum="Error">
</return>
<argument index="0" name="buffer" type="PackedByteArray">
</argument>
<description>
Loads an image from the binary contents of a BMP file.
[b]Note:[/b] Godot's BMP module doesn't support 16-bit per pixel images. Only 1-bit, 4-bit, 8-bit, 24-bit, and 32-bit per pixel images are supported.
</description>
</method>
<method name="load_jpg_from_buffer">
<return type="int" enum="Error">
</return>