Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
Image¶
Inherits: Resource < RefCounted < Object
Image datatype.
Description¶
Native image datatype. Contains image data which can be converted to an ImageTexture and provides commonly used image processing methods. The maximum width and height for an Image are MAX_WIDTH and MAX_HEIGHT.
An Image cannot be assigned to a texture property of an object directly (such as Sprite2D.texture), and has to be converted manually to an ImageTexture first.
Note: The maximum image size is 16384×16384 pixels due to graphics hardware limitations. Larger images may fail to import.
Tutorials¶
Properties¶
|
Methods¶
Enumerations¶
enum Format:
Format FORMAT_L8 = 0
Texture format with a single 8-bit depth representing luminance.
Format FORMAT_LA8 = 1
OpenGL texture format with two values, luminance and alpha each stored with 8 bits.
Format FORMAT_R8 = 2
OpenGL texture format RED
with a single component and a bitdepth of 8.
Format FORMAT_RG8 = 3
OpenGL texture format RG
with two components and a bitdepth of 8 for each.
Format FORMAT_RGB8 = 4
OpenGL texture format RGB
with three components, each with a bitdepth of 8.
Note: When creating an ImageTexture, an sRGB to linear color space conversion is performed.
Format FORMAT_RGBA8 = 5
OpenGL texture format RGBA
with four components, each with a bitdepth of 8.
Note: When creating an ImageTexture, an sRGB to linear color space conversion is performed.
Format FORMAT_RGBA4444 = 6
OpenGL texture format RGBA
with four components, each with a bitdepth of 4.
Format FORMAT_RGB565 = 7
Format FORMAT_RF = 8
OpenGL texture format GL_R32F
where there's one component, a 32-bit floating-point value.
Format FORMAT_RGF = 9
OpenGL texture format GL_RG32F
where there are two components, each a 32-bit floating-point values.
Format FORMAT_RGBF = 10
OpenGL texture format GL_RGB32F
where there are three components, each a 32-bit floating-point values.
Format FORMAT_RGBAF = 11
OpenGL texture format GL_RGBA32F
where there are four components, each a 32-bit floating-point values.
Format FORMAT_RH = 12
OpenGL texture format GL_R16F
where there's one component, a 16-bit "half-precision" floating-point value.
Format FORMAT_RGH = 13
OpenGL texture format GL_RG16F
where there are two components, each a 16-bit "half-precision" floating-point value.
Format FORMAT_RGBH = 14
OpenGL texture format GL_RGB16F
where there are three components, each a 16-bit "half-precision" floating-point value.