diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-11-17 16:17:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-17 16:17:33 +0100 |
commit | c56a071d0c6e282dbb82aa7e69691e33f6c2fd7e (patch) | |
tree | d96e6a7bf59b9f059b4212a0d36f8f6963e0cb62 /doc/classes/Image.xml | |
parent | b59a6fc40e70e435821734429fab0df571475172 (diff) | |
parent | 0ee88d6705852df81eb1bf0b0869e65d60c3352e (diff) |
Merge pull request #42412 from Xrayez/doc-image-texture
Describe `ImageTexture`, `Image` creation and usage
Diffstat (limited to 'doc/classes/Image.xml')
-rw-r--r-- | doc/classes/Image.xml | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index 3b108468de..edf27b1660 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -4,10 +4,12 @@ Image datatype. </brief_description> <description> - Native image datatype. Contains image data, which can be converted to a [Texture2D], and several functions to interact with it. The maximum width and height for an [Image] are [constant MAX_WIDTH] and [constant MAX_HEIGHT]. - [b]Note:[/b] The maximum image size is 16384×16384 pixels due to graphics hardware limitations. Larger images will fail to import. + Native image datatype. Contains image data which can be converted to an [ImageTexture] and provides commonly used [i]image processing[/i] methods. The maximum width and height for an [Image] are [constant MAX_WIDTH] and [constant MAX_HEIGHT]. + An [Image] cannot be assigned to a [code]texture[/code] property of an object directly (such as [Sprite2D]), and has to be converted manually to an [ImageTexture] first. + [b]Note:[/b] The maximum image size is 16384×16384 pixels due to graphics hardware limitations. Larger images may fail to import. </description> <tutorials> + <link title="Importing images">https://docs.godotengine.org/en/latest/getting_started/workflow/assets/importing_images.html</link> </tutorials> <methods> <method name="blend_rect"> @@ -344,6 +346,8 @@ </argument> <description> 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. + [b]Warning:[/b] This method should only be used in the editor or in cases when you need to load external images at run-time, such as images located at the [code]user://[/code] directory, and may not work in exported projects. + See also [ImageTexture] description for usage examples. </description> </method> <method name="load_bmp_from_buffer"> |