.. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. .. _class_Image: Image ===== **Category:** Built-In Types Brief Description ----------------- Image datatype. Member Functions ---------------- +----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`blit_rect` **(** :ref:`Image` src, :ref:`Rect2` src_rect, :ref:`Vector2` dest=0 **)** | +----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`brush_transfer` **(** :ref:`Image` src, :ref:`Image` brush, :ref:`Vector2` pos=0 **)** | +----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Image` | :ref:`brushed` **(** :ref:`Image` src, :ref:`Image` brush, :ref:`Vector2` pos=0 **)** | +----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Image` | :ref:`compressed` **(** :ref:`int` format=0 **)** | +----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Image` | :ref:`converted` **(** :ref:`int` format=0 **)** | +----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Image` | :ref:`decompressed` **(** **)** | +----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`empty` **(** **)** | +----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`fix_alpha_edges` **(** **)** | +----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RawArray` | :ref:`get_data` **(** **)** | +----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_format` **(** **)** | +----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_height` **(** **)** | +----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`get_pixel` **(** :ref:`int` x, :ref:`int` y, :ref:`int` mipmap_level=0 **)** | +----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Image` | :ref:`get_rect` **(** :ref:`Rect2` area=0 **)** | +----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Rect2` | :ref:`get_used_rect` **(** **)** | +----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_width` **(** **)** | +----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`load` **(** :ref:`String` path=0 **)** | +----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`put_pixel` **(** :ref:`int` x, :ref:`int` y, :ref:`Color` color, :ref:`int` mipmap_level=0 **)** | +----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Image` | :ref:`resized` **(** :ref:`int` x, :ref:`int` y, :ref:`int` interpolation=1 **)** | +----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`save_png` **(** :ref:`String` path=0 **)** | +----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Image` | :ref:`Image` **(** :ref:`int` width, :ref:`int` height, :ref:`bool` mipmaps, :ref:`int` format **)** | +----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Numeric Constants ----------------- - **COMPRESS_BC** = **0** - **COMPRESS_PVRTC2** = **1** - **COMPRESS_PVRTC4** = **2** - **COMPRESS_ETC** = **3** - **FORMAT_GRAYSCALE** = **0** - **FORMAT_INTENSITY** = **1** - **FORMAT_GRAYSCALE_ALPHA** = **2** - **FORMAT_RGB** = **3** - **FORMAT_RGBA** = **4** - **FORMAT_INDEXED** = **5** - **FORMAT_INDEXED_ALPHA** = **6** - **FORMAT_YUV_422** = **7** - **FORMAT_YUV_444** = **8** - **FORMAT_BC1** = **9** - **FORMAT_BC2** = **10** - **FORMAT_BC3** = **11** - **FORMAT_BC4** = **12** - **FORMAT_BC5** = **13** - **FORMAT_PVRTC2** = **14** - **FORMAT_PVRTC2_ALPHA** = **15** - **FORMAT_PVRTC4** = **16** - **FORMAT_PVRTC4_ALPHA** = **17** - **FORMAT_ETC** = **18** - **FORMAT_ATC** = **19** - **FORMAT_ATC_ALPHA_EXPLICIT** = **20** - **FORMAT_ATC_ALPHA_INTERPOLATED** = **21** - **FORMAT_CUSTOM** = **22** Description ----------- Built in native image datatype. Contains image data, which can be converted to a texture, and several functions to interact with it. Member Function Description --------------------------- .. _class_Image_blit_rect: - void **blit_rect** **(** :ref:`Image` src, :ref:`Rect2` src_rect, :ref:`Vector2` dest=0 **)** .. _class_Image_brush_transfer: - void **brush_transfer** **(** :ref:`Image` src, :ref:`Image` brush, :ref:`Vector2` pos=0 **)** .. _class_Image_brushed: - :ref:`Image` **brushed** **(** :ref:`Image` src, :ref:`Image` brush, :ref:`Vector2` pos=0 **)** .. _class_Image_compressed: - :ref:`Image` **compressed** **(** :ref:`int` format=0 **)** .. _class_Image_converted: - :ref:`Image` **converted** **(** :ref:`int` format=0 **)** .. _class_Image_decompressed: - :ref:`Image` **decompressed** **(** **)** .. _class_Image_empty: - :ref:`bool` **empty** **(** **)** .. _class_Image_fix_alpha_edges: - void **fix_alpha_edges** **(** **)** .. _class_Image_get_data: - :ref:`RawArray` **get_data** **(** **)** .. _class_Image_get_format: - :ref:`int` **get_format** **(** **)** .. _class_Image_get_height: - :ref:`int` **get_height** **(** **)** .. _class_Image_get_pixel: - :ref:`Color` **get_pixel** **(** :ref:`int` x, :ref:`int` y, :ref:`int` mipmap_level=0 **)** .. _class_Image_get_rect: - :ref:`Image` **get_rect** **(** :ref:`Rect2` area=0 **)** .. _class_Image_get_used_rect: - :ref:`Rect2` **get_used_rect** **(** **)** .. _class_Image_get_width: - :ref:`int` **get_width** **(** **)** .. _class_Image_load: - :ref:`int` **load** **(** :ref:`String` path=0 **)** .. _class_Image_put_pixel: - void **put_pixel** **(** :ref:`int` x, :ref:`int` y, :ref:`Color` color, :ref:`int` mipmap_level=0 **)** .. _class_Image_resized: - :ref:`Image` **resized** **(** :ref:`int` x, :ref:`int` y, :ref:`int` interpolation=1 **)** .. _class_Image_save_png: - :ref:`int` **save_png** **(** :ref:`String` path=0 **)** .. _class_Image_Image: - :ref:`Image` **Image** **(** :ref:`int` width, :ref:`int` height, :ref:`bool` mipmaps, :ref:`int` format **)** Create an empty image of a specific size and format.