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), 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¶
void |
adjust_bcs ( float brightness, float contrast, float saturation ) |
void |
blend_rect ( Image src, Rect2i src_rect, Vector2i dst ) |
void |
blend_rect_mask ( Image src, Image mask, Rect2i src_rect, Vector2i dst ) |
void |
|
void |
blit_rect_mask ( Image src, Image mask, Rect2i src_rect, Vector2i dst ) |
void |
bump_map_to_normal_map ( float bump_scale=1.0 ) |
void |
clear_mipmaps ( ) |
compress ( CompressMode mode, CompressSource source=0, ASTCFormat astc_format=0 ) |
|
compress_from_channels ( CompressMode mode, UsedChannels channels, ASTCFormat astc_format=0 ) |
|
compute_image_metrics ( Image compared_image, bool use_luma ) |
|
void |
|
void |
|
create ( int width, int height, bool use_mipmaps, Format format ) static |
|
create_from_data ( int width, int height, bool use_mipmaps, Format format, PackedByteArray data ) static |
|
void |
|
decompress ( ) |
|
detect_alpha ( ) const |
|
detect_used_channels ( CompressSource source=0 ) const |
|
void |
|
void |
|
void |
fix_alpha_edges ( ) |
void |
flip_x ( ) |
void |
flip_y ( ) |
generate_mipmaps ( bool renormalize=false ) |
|
get_data ( ) const |
|
get_format ( ) const |
|
get_height ( ) const |
|