Inherits: Texture < Resource < Reference < Object
A Texture based on an Image. Can be created from an Image with create_from_image.
Note: The maximum image size is 16384×16384 pixels due to graphics hardware limitations. Larger images will fail to import.
| int | flags |
7 (parent override)
|
| float | lossy_quality | 0.7 |
| Storage | storage | 0 |
| void | create ( int width, int height, Format format, int flags=7 ) |
| void | create_from_image ( Image image, int flags=7 ) |
| Format | get_format ( ) const |
| Error | load ( String path ) |
| void | set_data ( Image image ) |
| void | set_size_override ( Vector2 size ) |
enum Storage:
| Default | 0.7 |
| Setter | set_lossy_storage_quality(value) |
| Getter | get_lossy_storage_quality() |
The storage quality for STORAGE_COMPRESS_LOSSY.
| Default | 0 |
| Setter | set_storage(value) |
| Getter | get_storage() |
The storage type (raw, lossy, or compressed).
Create a new ImageTexture with width and height.
format is a value from Format, flags is any combination of Flags.
Create a new ImageTexture from an Image with flags from Flags. An sRGB to linear color space conversion can take place, according to Format.
Returns the format of the ImageTexture, one of Format.
Load an ImageTexture from a file path.
Sets the Image of this ImageTexture.
Resizes the ImageTexture to the specified dimensions.
© 2014–2020 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.
https://docs.godotengine.org/en/3.2/classes/class_imagetexture.html