Image

Inherits: Resource < RefCounted < Object

There is currently no description for this class. Please help us by contributing one!

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

clear_mipmaps ( )

Error

compress ( CompressMode mode, CompressSource source=0, ASTCFormat astc_format=0 )

Error

compress_from_channels ( CompressMode mode, UsedChannels channels, ASTCFormat astc_format=0 )

Dictionary

compute_image_metrics ( Image compared_image, bool use_luma )

void

convert ( Format format )

void

copy_from ( Image src )

Image

create ( int width, int height, bool use_mipmaps, Format format ) static

Image

create_empty ( int width, int height, bool use_mipmaps, Format format ) static

Image

create_from_data ( int width, int height, bool use_mipmaps, Format format, PackedByteArray data ) static

void

crop ( int width, int height )

Error

decompress ( )

AlphaMode

detect_alpha ( ) const

UsedChannels

detect_used_channels ( CompressSource source=0 ) const

void

fill ( Color color )

void

fill_rect ( Rect2i rect, Color color )

void

fix_alpha_edges ( )

void

flip_x ( )

void

flip_y ( )

Error

generate_mipmaps ( bool renormalize=false )

PackedByteArray

get_data ( ) const

int

get_data_size ( ) const

Format

get_format ( ) const

int

get_height ( ) const

int

get_mipmap_count ( ) const

int

get_mipmap_offset ( int mipmap ) const

Color

get_pixel ( int x, int y ) const

Color

get_pixelv ( Vector2i point ) const

Image

get_region ( Rect2i region ) const

Vector2i

get_size ( ) const

Rect2i

get_used_rect ( ) const

int

get_width ( ) const

bool

has_mipmaps ( ) const

bool

is_compressed ( ) const

bool

is_empty ( ) const

bool

is_invisible ( ) const

Error

load ( String path )

Error

load_bmp_from_buffer ( PackedByteArray buffer )

Image

load_from_file ( String path ) static

Error

load_jpg_from_buffer ( PackedByteArray buffer )

Error

load_ktx_from_buffer ( PackedByteArray buffer )

Error

load_png_from_buffer ( PackedByteArray buffer )

Error

load_svg_from_buffer ( PackedByteArray buffer, float scale=1.0 )

Error

load_svg_from_string ( String svg_str, float scale=1.0 )

Error

load_tga_from_buffer ( PackedByteArray buffer )

Error

load_webp_from_buffer ( PackedByteArray buffer )

void

normal_map_to_xy ( )

void

premultiply_alpha ( )

void

resize ( int width, int height, Interpolation interpolation=1 )

void

resize_to_po2 ( bool square=false, Interpolation interpolation=1 )

Image

rgbe_to_srgb ( )

void

rotate_90 ( ClockDirection direction )

void

rotate_180 ( )

Error

save_exr ( String path, bool grayscale=false ) const

PackedByteArray

save_exr_to_buffer ( bool grayscale=false ) const

Error

save_jpg ( String path, float quality=0.75 ) const

PackedByteArray

save_jpg_to_buffer ( float quality=0.75 ) const

Error

save_png ( String path ) const

PackedByteArray

save_png_to_buffer ( ) const

Error

save_webp ( String path, bool lossy=false, float quality=0.75 ) const

PackedByteArray

save_webp_to_buffer ( bool lossy=false, float quality=0.75 ) const

void

set_data ( int width, int height, bool use_mipmaps, Format format, PackedByteArray data )

void

set_pixel ( int x, int y, Color color )

void

set_pixelv ( Vector2i point, Color color )

void

shrink_x2 ( )

void

srgb_to_linear ( )


Enumerations

enum Format:

Format FORMAT_L8 = 0

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_LA8 = 1

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_R8 = 2

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_RG8 = 3

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_RGB8 = 4

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_RGBA8 = 5

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_RGBA4444 = 6

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_RGB565 = 7

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_RF = 8

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_RGF = 9

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_RGBF = 10

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_RGBAF = 11

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_RH = 12

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_RGH = 13

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_RGBH = 14

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_RGBAH = 15

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_RGBE9995 = 16

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_DXT1 = 17

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_DXT3 = 18

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_DXT5 = 19

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_RGTC_R = 20

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_RGTC_RG = 21

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_BPTC_RGBA = 22

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_BPTC_RGBF = 23

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_BPTC_RGBFU = 24

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_ETC = 25

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_ETC2_R11 = 26

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_ETC2_R11S = 27

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_ETC2_RG11 = 28

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_ETC2_RG11S = 29

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_ETC2_RGB8 = 30

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_ETC2_RGBA8 = 31

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_ETC2_RGB8A1 = 32

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_ETC2_RA_AS_RG = 33

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_DXT5_RA_AS_RG = 34

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_ASTC_4x4 = 35

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_ASTC_4x4_HDR = 36

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_ASTC_8x8 = 37

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_ASTC_8x8_HDR = 38

There is currently no description for this enum. Please help us by contributing one!

Format FORMAT_MAX = 39

There is currently no description for this enum. Please help us by contributing one!


enum Interpolation:

Interpolation INTERPOLATE_NEAREST = 0

There is currently no description for this enum. Please help us by contributing one!

Interpolation INTERPOLATE_BILINEAR = 1

There is currently no description for this enum. Please help us by contributing one!

Interpolation INTERPOLATE_CUBIC = 2

There is currently no description for this enum. Please help us by contributing one!

Interpolation INTERPOLATE_TRILINEAR = 3

There is currently no description for this enum. Please help us by contributing one!

Interpolation INTERPOLATE_LANCZOS = 4

There is currently no description for this enum. Please help us by contributing one!


enum AlphaMode:

AlphaMode ALPHA_NONE = 0

There is currently no description for this enum. Please help us by contributing one!

AlphaMode ALPHA_BIT = 1

There is currently no description for this enum. Please help us by contributing one!

AlphaMode ALPHA_BLEND = 2

There is currently no description for this enum. Please help us by contributing one!


enum CompressMode:

CompressMode COMPRESS_S3TC = 0

There is currently no description for this enum. Please help us by contributing one!

CompressMode COMPRESS_ETC = 1

There is currently no description for this enum. Please help us by contributing one!

CompressMode COMPRESS_ETC2 = 2

There is currently no description for this enum. Please help us by contributing one!

CompressMode COMPRESS_BPTC = 3

There is currently no description for this enum. Please help us by contributing one!

CompressMode COMPRESS_ASTC = 4

There is currently no description for this enum. Please help us by contributing one!

CompressMode COMPRESS_MAX = 5

There is currently no description for this enum. Please help us by contributing one!


enum UsedChannels:

UsedChannels USED_CHANNELS_L = 0

There is currently no description for this enum. Please help us by contributing one!

UsedChannels USED_CHANNELS_LA = 1

There is currently no description for this enum. Please help us by contributing one!

UsedChannels USED_CHANNELS_R = 2

There is currently no description for this enum. Please help us by contributing one!

UsedChannels USED_CHANNELS_RG = 3

There is currently no description for this enum. Please help us by contributing one!

UsedChannels USED_CHANNELS_RGB = 4

There is currently no description for this enum. Please help us by contributing one!

UsedChannels USED_CHANNELS_RGBA = 5

There is currently no description for this enum. Please help us by contributing one!


enum CompressSource:

CompressSource COMPRESS_SOURCE_GENERIC = 0

There is currently no description for this enum. Please help us by contributing one!

CompressSource COMPRESS_SOURCE_SRGB = 1

There is currently no description for this enum. Please help us by contributing one!

CompressSource COMPRESS_SOURCE_NORMAL = 2

There is currently no description for this enum. Please help us by contributing one!


enum ASTCFormat:

ASTCFormat ASTC_FORMAT_4x4 = 0

There is currently no description for this enum. Please help us by contributing one!

ASTCFormat ASTC_FORMAT_8x8 = 1

There is currently no description for this enum. Please help us by contributing one!


Constants

MAX_WIDTH = 16777216

There is currently no description for this constant. Please help us by contributing one!

MAX_HEIGHT = 16777216

There is currently no description for this constant. Please help us by contributing one!


Property Descriptions

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

There is currently no description for this property. Please help us by contributing one!


Method Descriptions

void adjust_bcs ( float brightness, float contrast, float saturation )

There is currently no description for this method. Please help us by contributing one!


void blend_rect ( Image src, Rect2i src_rect, Vector2i dst )

There is currently no description for this method. Please help us by contributing one!


void blend_rect_mask ( Image src, Image mask, Rect2i src_rect, Vector2i dst )

There is currently no description for this method. Please help us by contributing one!


void blit_rect ( Image src, Rect2i src_rect, Vector2i dst )

There is currently no description for this method. Please help us by contributing one!


void blit_rect_mask ( Image src, Image mask, Rect2i src_rect, Vector2i dst )

There is currently no description for this method. Please help us by contributing one!


void bump_map_to_normal_map ( float bump_scale=1.0 )

There is currently no description for this method. Please help us by contributing one!


void clear_mipmaps ( )

There is currently no description for this method. Please help us by contributing one!


Error compress ( CompressMode mode, CompressSource source=0, ASTCFormat astc_format=0 )

There is currently no description for this method. Please help us by contributing one!


Error compress_from_channels ( CompressMode mode, UsedChannels channels, ASTCFormat astc_format=0 )

There is currently no description for this method. Please help us by contributing one!


Dictionary compute_image_metrics ( Image compared_image, bool use_luma )

There is currently no description for this method. Please help us by contributing one!


void convert ( Format format )

There is currently no description for this method. Please help us by contributing one!


void copy_from ( Image src )

There is currently no description for this method. Please help us by contributing one!


Image create ( int width, int height, bool use_mipmaps, Format format ) static

There is currently no description for this method. Please help us by contributing one!


Image create_empty ( int width, int height, bool use_mipmaps, Format format ) static

There is currently no description for this method. Please help us by contributing one!


Image create_from_data ( int width, int height, bool use_mipmaps, Format format, PackedByteArray data ) static

There is currently no description for this method. Please help us by contributing one!


void crop ( int width, int height )

There is currently no description for this method. Please help us by contributing one!


Error decompress ( )

There is currently no description for this method. Please help us by contributing one!


AlphaMode detect_alpha ( ) const

There is currently no description for this method. Please help us by contributing one!


UsedChannels detect_used_channels ( CompressSource source=0 ) const

There is currently no description for this method. Please help us by contributing one!


void fill ( Color color )

There is currently no description for this method. Please help us by contributing one!


void fill_rect ( Rect2i rect, Color color )

There is currently no description for this method. Please help us by contributing one!


void fix_alpha_edges ( )

There is currently no description for this method. Please help us by contributing one!


void flip_x ( )

There is currently no description for this method. Please help us by contributing one!


void flip_y ( )

There is currently no description for this method. Please help us by contributing one!


Error generate_mipmaps ( bool renormalize=false )

There is currently no description for this method. Please help us by contributing one!


PackedByteArray get_data ( ) const

There is currently no description for this method. Please help us by contributing one!


int get_data_size ( ) const

There is currently no description for this method. Please help us by contributing one!


Format get_format ( ) const

There is currently no description for this method. Please help us by contributing one!


int get_height ( ) const

There is currently no description for this method. Please help us by contributing one!


int get_mipmap_count ( ) const

There is currently no description for this method. Please help us by contributing one!


int get_mipmap_offset ( int mipmap ) const

There is currently no description for this method. Please help us by contributing one!


Color get_pixel ( int x, int y ) const

There is currently no description for this method. Please help us by contributing one!


Color get_pixelv ( Vector2i point ) const

There is currently no description for this method. Please help us by contributing one!


Image get_region ( Rect2i region ) const

There is currently no description for this method. Please help us by contributing one!


Vector2i get_size ( ) const

There is currently no description for this method. Please help us by contributing one!


Rect2i get_used_rect ( ) const

There is currently no description for this method. Please help us by contributing one!


int get_width ( ) const

There is currently no description for this method. Please help us by contributing one!


bool has_mipmaps ( ) const

There is currently no description for this method. Please help us by contributing one!


bool is_compressed ( ) const

There is currently no description for this method. Please help us by contributing one!


bool is_empty ( ) const

There is currently no description for this method. Please help us by contributing one!


bool is_invisible ( ) const

There is currently no description for this method. Please help us by contributing one!


Error load ( String path )

There is currently no description for this method. Please help us by contributing one!


Error load_bmp_from_buffer ( PackedByteArray buffer )

There is currently no description for this method. Please help us by contributing one!


Image load_from_file ( String path ) static

There is currently no description for this method. Please help us by contributing one!


Error load_jpg_from_buffer ( PackedByteArray buffer )

There is currently no description for this method. Please help us by contributing one!


Error load_ktx_from_buffer ( PackedByteArray buffer )

There is currently no description for this method. Please help us by contributing one!


Error load_png_from_buffer ( PackedByteArray buffer )

There is currently no description for this method. Please help us by contributing one!


Error load_svg_from_buffer ( PackedByteArray buffer, float scale=1.0 )

There is currently no description for this method. Please help us by contributing one!


Error load_svg_from_string ( String svg_str, float scale=1.0 )

There is currently no description for this method. Please help us by contributing one!


Error load_tga_from_buffer ( PackedByteArray buffer )

There is currently no description for this method. Please help us by contributing one!


Error load_webp_from_buffer ( PackedByteArray buffer )

There is currently no description for this method. Please help us by contributing one!


void normal_map_to_xy ( )

There is currently no description for this method. Please help us by contributing one!


void premultiply_alpha ( )

There is currently no description for this method. Please help us by contributing one!


void resize ( int width, int height, Interpolation interpolation=1 )

There is currently no description for this method. Please help us by contributing one!


void resize_to_po2 ( bool square=false, Interpolation interpolation=1 )

There is currently no description for this method. Please help us by contributing one!


Image rgbe_to_srgb ( )

There is currently no description for this method. Please help us by contributing one!


void rotate_90 ( ClockDirection direction )

There is currently no description for this method. Please help us by contributing one!


void rotate_180 ( )

There is currently no description for this method. Please help us by contributing one!


Error save_exr ( String path, bool grayscale=false ) const

There is currently no description for this method. Please help us by contributing one!


PackedByteArray save_exr_to_buffer ( bool grayscale=false ) const

There is currently no description for this method. Please help us by contributing one!


Error save_jpg ( String path, float quality=0.75 ) const

There is currently no description for this method. Please help us by contributing one!


PackedByteArray save_jpg_to_buffer ( float quality=0.75 ) const

There is currently no description for this method. Please help us by contributing one!


Error save_png ( String path ) const

There is currently no description for this method. Please help us by contributing one!


PackedByteArray save_png_to_buffer ( ) const

There is currently no description for this method. Please help us by contributing one!


Error save_webp ( String path, bool lossy=false, float quality=0.75 ) const

There is currently no description for this method. Please help us by contributing one!


PackedByteArray save_webp_to_buffer ( bool lossy=false, float quality=0.75 ) const

There is currently no description for this method. Please help us by contributing one!


void set_data ( int width, int height, bool use_mipmaps, Format format, PackedByteArray data )

There is currently no description for this method. Please help us by contributing one!


void set_pixel ( int x, int y, Color color )

There is currently no description for this method. Please help us by contributing one!


void set_pixelv ( Vector2i point, Color color )

There is currently no description for this method. Please help us by contributing one!


void shrink_x2 ( )

There is currently no description for this method. Please help us by contributing one!


void srgb_to_linear ( )

There is currently no description for this method. Please help us by contributing one!