|
|
@@ -3925,6 +3925,7 @@ void Image::_bind_methods() {
|
|
|
ClassDB::bind_method(D_METHOD("load_bmp_from_buffer", "buffer"), &Image::load_bmp_from_buffer);
|
|
|
ClassDB::bind_method(D_METHOD("load_ktx_from_buffer", "buffer"), &Image::load_ktx_from_buffer);
|
|
|
ClassDB::bind_method(D_METHOD("load_dds_from_buffer", "buffer"), &Image::load_dds_from_buffer);
|
|
|
+ ClassDB::bind_method(D_METHOD("load_exr_from_buffer", "buffer"), &Image::load_exr_from_buffer);
|
|
|
|
|
|
ClassDB::bind_method(D_METHOD("load_svg_from_buffer", "buffer", "scale"), &Image::load_svg_from_buffer, DEFVAL(1.0));
|
|
|
ClassDB::bind_method(D_METHOD("load_svg_from_string", "svg_str", "scale"), &Image::load_svg_from_string, DEFVAL(1.0));
|
|
|
@@ -4424,6 +4425,14 @@ Error Image::load_jpg_from_buffer(const Vector<uint8_t> &p_array) {
|
|
|
return _load_from_buffer(p_array, _jpg_mem_loader_func);
|
|
|
}
|
|
|
|
|
|
+Error Image::load_exr_from_buffer(const Vector<uint8_t> &p_array) {
|
|
|
+ ERR_FAIL_NULL_V_MSG(
|
|
|
+ _exr_mem_loader_func,
|
|
|
+ ERR_UNAVAILABLE,
|
|
|
+ "The TinyEXR module isn't enabled. Recompile the Godot editor or export template binary with the `tinyexr_export_templates=yes` SCons option.");
|
|
|
+ return _load_from_buffer(p_array, _exr_mem_loader_func);
|
|
|
+}
|
|
|
+
|
|
|
Error Image::load_webp_from_buffer(const Vector<uint8_t> &p_array) {
|
|
|
return _load_from_buffer(p_array, _webp_mem_loader_func);
|
|
|
}
|