summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2022-06-04 16:05:55 -0500
committerAaron Franke <arnfranke@yahoo.com>2022-06-21 08:27:51 -0500
commit8f05bd97b5c03510937270af23cc9f513b33be4b (patch)
tree6796ea2f98bf2f859aa1c1adbc629e051aea5a93 /doc/classes
parentfdfbaf9f0f3fb8cbf640f0d409257039c14f314f (diff)
Add support for saving WebP images
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/Image.xml20
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">