diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2022-06-21 17:59:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-21 17:59:37 +0200 |
commit | c18d0f20357a11bd9cfa2f57b8b9b500763413bc (patch) | |
tree | fe23c874b0970094577f04179c3a7a7ccb64fc88 /doc/classes | |
parent | f3bf0334bbbb3308d496425df0750e5ddf3e1fe8 (diff) | |
parent | 8f05bd97b5c03510937270af23cc9f513b33be4b (diff) | |
download | redot-engine-c18d0f20357a11bd9cfa2f57b8b9b500763413bc.tar.gz |
Merge pull request #61770 from aaronfranke/webp
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/Image.xml | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index 20e26714bc..5472ffe4da 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -397,12 +397,30 @@ <return type="int" enum="Error" /> <argument index="0" name="path" type="String" /> <description> - Saves the image as a PNG file to [code]path[/code]. + Saves the image as a PNG file to the file at [code]path[/code]. </description> </method> <method name="save_png_to_buffer" qualifiers="const"> <return type="PackedByteArray" /> <description> + Saves the image as a PNG file to a byte array. + </description> + </method> + <method name="save_webp" qualifiers="const"> + <return type="int" enum="Error" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="lossy" type="bool" default="false" /> + <argument index="2" name="quality" type="float" default="0.75" /> + <description> + Saves the image as a WebP (Web Picture) file to the file at [code]path[/code]. By default it will save lossless. If [code]lossy[/code] is true, the image will be saved lossy, using the [code]quality[/code] setting between 0.0 and 1.0 (inclusive). + </description> + </method> + <method name="save_webp_to_buffer" qualifiers="const"> + <return type="PackedByteArray" /> + <argument index="0" name="lossy" type="bool" default="false" /> + <argument index="1" name="quality" type="float" default="0.75" /> + <description> + Saves the image as a WebP (Web Picture) file to a byte array. By default it will save lossless. If [code]lossy[/code] is true, the image will be saved lossy, using the [code]quality[/code] setting between 0.0 and 1.0 (inclusive). </description> </method> <method name="set_pixel"> |