Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

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

Dictionary

data

{ "data": PackedByteArray(), "format": "Lum8", "height": 0, "mipmaps": false, "width": 0 }

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

blit_rect ( Image src, Rect2i src_rect, Vector2i dst )

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