Restore the openexr grayscale property.

This commit is contained in:
K. S. Ernest (iFire) Lee 2022-06-23 20:55:37 -07:00
parent ecf187705e
commit 42f7f0894e
3 changed files with 11 additions and 3 deletions

View file

@ -380,6 +380,14 @@
[b]Note:[/b] The TinyEXR module is disabled in non-editor builds, which means [method save_exr] will return [constant ERR_UNAVAILABLE] when it is called from an exported project.
</description>
</method>
<method name="save_exr_to_buffer" qualifiers="const">
<return type="PackedByteArray" />
<argument index="0" name="grayscale" type="bool" default="false" />
<description>
Saves the image as an EXR file to a byte array. If [code]grayscale[/code] is [code]true[/code] and the image has only one channel, it will be saved explicitly as monochrome rather than one red channel. This function will return an empty byte array if Godot was compiled without the TinyEXR module.
[b]Note:[/b] The TinyEXR module is disabled in non-editor builds, which means [method save_exr] will return an empty byte array when it is called from an exported project.
</description>
</method>
<method name="save_jpg" qualifiers="const">
<return type="int" enum="Error" />
<argument index="0" name="path" type="String" />