2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								<?xml version="1.0" encoding="UTF-8" ?>  
						 
					
						
							
								
									
										
										
										
											2020-01-31 17:03:48 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								<class  name= "Image"  inherits= "Resource"  version= "4.0" >  
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									<brief_description > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										Image datatype.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									</brief_description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									<description > 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-29 17:27:13 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										Native image datatype. Contains image data which can be converted to an [ImageTexture] and provides commonly used [i]image processing[/i] methods. The maximum width and height for an [Image] are [constant MAX_WIDTH] and [constant MAX_HEIGHT].
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										An [Image] cannot be assigned to a [code]texture[/code] property of an object directly (such as [Sprite2D]), and has to be converted manually to an [ImageTexture] first.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
										[b]Note:[/b] The maximum image size is 16384× 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									<tutorials > 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-29 17:27:13 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<link  title= "Importing images" > https://docs.godotengine.org/en/latest/getting_started/workflow/assets/importing_images.html</link> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									</tutorials> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									<methods > 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-19 13:35:31 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "adjust_bcs" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "void"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "0"  name= "brightness"  type= "float"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "1"  name= "contrast"  type= "float"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "2"  name= "saturation"  type= "float"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-19 13:35:31 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "blend_rect" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "void"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "0"  name= "src"  type= "Image"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "1"  name= "src_rect"  type= "Rect2"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "2"  name= "dst"  type= "Vector2"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-25 11:08:55 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image at coordinates [code]dest[/code].
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "blend_rect_mask" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "void"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "0"  name= "src"  type= "Image"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "1"  name= "mask"  type= "Image"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "2"  name= "src_rect"  type= "Rect2"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "3"  name= "dst"  type= "Vector2"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-25 11:08:55 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha channels are required for both [code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and [code]src[/code] pixels will blend if the corresponding mask pixel's alpha value is not 0. [code]src[/code] image and [code]mask[/code] image [b]must[/b] have the same size (width and height) but they can have different formats.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "blit_rect" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "void"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "0"  name= "src"  type= "Image"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "1"  name= "src_rect"  type= "Rect2"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "2"  name= "dst"  type= "Vector2"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-25 11:08:55 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Copies [code]src_rect[/code] from [code]src[/code] image to this image at coordinates [code]dst[/code].
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "blit_rect_mask" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "void"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "0"  name= "src"  type= "Image"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "1"  name= "mask"  type= "Image"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "2"  name= "src_rect"  type= "Rect2"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "3"  name= "dst"  type= "Vector2"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-25 11:08:55 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Blits [code]src_rect[/code] area from [code]src[/code] image to this image at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's alpha value is not 0. [code]src[/code] image and [code]mask[/code] image [b]must[/b] have the same size (width and height) but they can have different formats.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-23 09:34:26 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "bump_map_to_normal_map" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "void"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "0"  name= "bump_scale"  type= "float"  default= "1.0"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2018-04-10 10:12:42 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-23 09:34:26 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Converts a bump map to a normal map. A bump map provides a height offset per-pixel, while a normal map provides a normal direction per pixel.
							 
						 
					
						
							
								
									
										
										
										
											2018-04-10 10:12:42 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "clear_mipmaps" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "void"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-25 11:08:55 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Removes the image's mipmaps.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "compress" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "int"  enum= "Error"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "0"  name= "mode"  type= "int"  enum= "Image.CompressMode"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "1"  name= "source"  type= "int"  enum= "Image.CompressSource"  default= "0"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "2"  name= "lossy_quality"  type= "float"  default= "0.7"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2019-12-06 23:09:20 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available. See [enum CompressMode] and [enum CompressSource] constants.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-12 09:59:06 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "compress_from_channels" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "int"  enum= "Error"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "0"  name= "mode"  type= "int"  enum= "Image.CompressMode"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "1"  name= "channels"  type= "int"  enum= "Image.UsedChannels"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "2"  name= "lossy_quality"  type= "float"  default= "0.7"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-12 09:59:06 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "convert" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "void"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "0"  name= "format"  type= "int"  enum= "Image.Format"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2019-12-06 23:09:20 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Converts the image's format. See [enum Format] constants.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "copy_from" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "void"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "0"  name= "src"  type= "Image"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-25 11:08:55 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Copies [code]src[/code] image to this image.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "create" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "void"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "0"  name= "width"  type= "int"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "1"  name= "height"  type= "int"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "2"  name= "use_mipmaps"  type= "bool"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "3"  name= "format"  type= "int"  enum= "Image.Format"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2019-12-06 23:09:20 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Creates an empty image of given size and format. See [enum Format] constants. If [code]use_mipmaps[/code] is [code]true[/code] then generate mipmaps for this image. See the [method generate_mipmaps].
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "create_from_data" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "void"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "0"  name= "width"  type= "int"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "1"  name= "height"  type= "int"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "2"  name= "use_mipmaps"  type= "bool"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "3"  name= "format"  type= "int"  enum= "Image.Format"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "4"  name= "data"  type= "PackedByteArray"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2020-06-13 17:10:26 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Creates a new image of given size and format. See [enum Format] constants. Fills the image with the given raw data. If [code]use_mipmaps[/code] is [code]true[/code] then loads mipmaps for this image from [code]data[/code]. See [method generate_mipmaps].
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "crop" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "void"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "0"  name= "width"  type= "int"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "1"  name= "height"  type= "int"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-25 11:08:55 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Crops the image to the given [code]width[/code] and [code]height[/code]. If the specified size is larger than the current size, the extra area is filled with black pixels.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "decompress" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "int"  enum= "Error"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2021-04-15 14:02:45 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Decompresses the image if it is VRAM compressed in a supported format. Returns [constant OK] if the format is supported, otherwise [constant ERR_UNAVAILABLE].
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												[b]Note:[/b] The following formats can be decompressed: DXT, RGTC, BPTC, PVRTC1. The formats ETC1 and ETC2 are not supported.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "detect_alpha"  qualifiers= "const" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "int"  enum= "Image.AlphaMode"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-14 13:27:14 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Returns [constant ALPHA_BLEND] if the image has data for alpha values. Returns [constant ALPHA_BIT] if all the alpha values are stored in a single bit. Returns [constant ALPHA_NONE] if no data for alpha values is found.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-12 09:59:06 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "detect_used_channels" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "int"  enum= "Image.UsedChannels"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "0"  name= "source"  type= "int"  enum= "Image.CompressSource"  default= "0"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-12 09:59:06 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "fill" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "void"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "0"  name= "color"  type= "Color"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-25 11:08:55 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Fills the image with a given [Color].
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "fix_alpha_edges" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "void"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-25 11:08:55 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Blends low-alpha pixels with nearby pixels.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "flip_x" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "void"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-25 11:08:55 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Flips the image horizontally.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "flip_y" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "void"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-25 11:08:55 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Flips the image vertically.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "generate_mipmaps" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "int"  enum= "Error"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "0"  name= "renormalize"  type= "bool"  default= "false"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-22 12:12:25 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Generates mipmaps for the image. Mipmaps are precalculated lower-resolution copies of the image that are automatically used if the image needs to be scaled down when rendered. They help improve image quality and performance when rendering. This method returns an error if the image is compressed, in a custom format, or if the image's width/height is [code]0[/code].
							 
						 
					
						
							
								
									
										
										
										
											2021-08-22 02:21:06 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												[b]Note:[/b] Mipmap generation is done on the CPU, is single-threaded and is [i]always[/i] done on the main thread. This means generating mipmaps will result in noticeable stuttering during gameplay, even if [method generate_mipmaps] is called from a [Thread].
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "get_data"  qualifiers= "const" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "PackedByteArray"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-11 11:10:18 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Returns a copy of the image's raw data.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "get_format"  qualifiers= "const" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "int"  enum= "Image.Format"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2019-12-06 23:09:20 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Returns the image's format. See [enum Format] constants.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "get_height"  qualifiers= "const" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "int"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-25 11:08:55 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Returns the image's height.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "get_mipmap_offset"  qualifiers= "const" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "int"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "0"  name= "mipmap"  type= "int"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-25 11:08:55 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Returns the offset where the image's mipmap with index [code]mipmap[/code] is stored in the [code]data[/code] dictionary.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "get_pixel"  qualifiers= "const" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "Color"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "0"  name= "x"  type= "int"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "1"  name= "y"  type= "int"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-21 02:42:29 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Returns the color of the pixel at [code](x, y)[/code].
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												This is the same as [method get_pixelv], but with two integer arguments instead of a [Vector2i] argument.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
									
										
										
										
											2018-05-12 09:38:00 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "get_pixelv"  qualifiers= "const" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "Color"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "0"  name= "point"  type= "Vector2i"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2018-05-12 09:38:00 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-21 02:42:29 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Returns the color of the pixel at [code]point[/code].
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												This is the same as [method get_pixel], but with a [Vector2i] argument instead of two integer arguments.
							 
						 
					
						
							
								
									
										
										
										
											2018-05-12 09:38:00 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "get_rect"  qualifiers= "const" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "Image"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "0"  name= "rect"  type= "Rect2"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-25 11:08:55 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Returns a new image that is a copy of the image's area specified with [code]rect[/code].
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "get_size"  qualifiers= "const" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "Vector2"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-25 11:08:55 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Returns the image's size (width and height).
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "get_used_rect"  qualifiers= "const" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "Rect2"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-20 15:52:09 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Returns a [Rect2] enclosing the visible portion of the image, considering each pixel with a non-zero alpha channel as visible.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "get_width"  qualifiers= "const" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "int"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-25 11:08:55 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Returns the image's width.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "has_mipmaps"  qualifiers= "const" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "bool"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-25 11:08:55 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Returns [code]true[/code] if the image has generated mipmaps.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "is_compressed"  qualifiers= "const" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "bool"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-25 11:08:55 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Returns [code]true[/code] if the image is compressed.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "is_empty"  qualifiers= "const" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "bool"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-25 11:08:55 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Returns [code]true[/code] if the image has no data.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "is_invisible"  qualifiers= "const" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "bool"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-25 11:08:55 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Returns [code]true[/code] if all the image's pixels have an alpha value of 0. Returns [code]false[/code] if any pixel has an alpha value higher than 0.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "load" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "int"  enum= "Error"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "0"  name= "path"  type= "String"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-29 17:57:56 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Loads an image from file [code]path[/code]. See [url=https://docs.godotengine.org/en/latest/getting_started/workflow/assets/importing_images.html#supported-image-formats]Supported image formats[/url] for a list of supported image formats and limitations.
							 
						 
					
						
							
								
									
										
										
										
											2020-09-29 17:27:13 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												[b]Warning:[/b] This method should only be used in the editor or in cases when you need to load external images at run-time, such as images located at the [code]user://[/code] directory, and may not work in exported projects.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												See also [ImageTexture] description for usage examples.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-20 23:25:58 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "load_bmp_from_buffer" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "int"  enum= "Error"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "0"  name= "buffer"  type= "PackedByteArray"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-20 23:25:58 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												Loads an image from the binary contents of a BMP file.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												[b]Note:[/b] Godot's BMP module doesn't support 16-bit per pixel images. Only 1-bit, 4-bit, 8-bit, 24-bit, and 32-bit per pixel images are supported.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
									
										
										
										
											2018-01-03 13:45:03 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "load_jpg_from_buffer" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "int"  enum= "Error"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "0"  name= "buffer"  type= "PackedByteArray"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2018-01-03 13:45:03 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2018-05-12 16:53:45 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Loads an image from the binary contents of a JPEG file.
							 
						 
					
						
							
								
									
										
										
										
											2018-01-03 13:45:03 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "load_png_from_buffer" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "int"  enum= "Error"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "0"  name= "buffer"  type= "PackedByteArray"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2018-01-03 13:45:03 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2018-05-12 16:53:45 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Loads an image from the binary contents of a PNG file.
							 
						 
					
						
							
								
									
										
										
										
											2018-01-03 13:45:03 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-01 14:18:13 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "load_tga_from_buffer" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "int"  enum= "Error"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "0"  name= "buffer"  type= "PackedByteArray"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-01 14:18:13 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												Loads an image from the binary contents of a TGA file.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
									
										
										
										
											2018-07-15 01:42:37 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "load_webp_from_buffer" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "int"  enum= "Error"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "0"  name= "buffer"  type= "PackedByteArray"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2018-07-15 01:42:37 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												Loads an image from the binary contents of a WebP file.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-23 09:34:26 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "normal_map_to_xy" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "void"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-23 09:34:26 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Converts the image's data to represent coordinates on a 3D plane. This is used when the image represents a normal map. A normal map can add lots of detail to a 3D surface without increasing the polygon count.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "premultiply_alpha" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "void"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-25 11:08:55 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Multiplies color values with alpha values. Resulting color values for a pixel are [code](color * alpha)/256[/code].
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "resize" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "void"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "0"  name= "width"  type= "int"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "1"  name= "height"  type= "int"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "2"  name= "interpolation"  type= "int"  enum= "Image.Interpolation"  default= "1"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-18 10:14:55 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Resizes the image to the given [code]width[/code] and [code]height[/code]. New pixels are calculated using the [code]interpolation[/code] mode defined via [enum Interpolation] constants.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "resize_to_po2" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "void"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "0"  name= "square"  type= "bool"  default= "false"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "1"  name= "interpolation"  type= "int"  enum= "Image.Interpolation"  default= "1"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-18 10:14:55 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Resizes the image to the nearest power of 2 for the width and height. If [code]square[/code] is [code]true[/code] then set width and height to be the same. New pixels are calculated using the [code]interpolation[/code] mode defined via [enum Interpolation] constants.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
									
										
										
										
											2018-06-11 13:41:16 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "rgbe_to_srgb" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "Image"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2018-06-11 13:41:16 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-14 13:27:14 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Converts a standard RGBE (Red Green Blue Exponent) image to an sRGB image.
							 
						 
					
						
							
								
									
										
										
										
											2018-06-11 13:41:16 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-13 12:35:50 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "save_exr"  qualifiers= "const" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "int"  enum= "Error"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "0"  name= "path"  type= "String"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "1"  name= "grayscale"  type= "bool"  default= "false"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2019-11-08 23:31:29 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Saves the image as an EXR file to [code]path[/code]. If [code]grayscale[/code] is [code]true[/code] and the image has only one channel, it will be saved explicitly as monochrome rather than one red channel. This function will return [constant ERR_UNAVAILABLE] if Godot was compiled without the TinyEXR module.
							 
						 
					
						
							
								
									
										
										
										
											2021-07-21 03:27:50 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												[b]Note:[/b] The TinyEXR module is disabled in non-editor builds, which means [method save_exr] will return [constant ERR_UNAVAILABLE] when it is called from an exported project.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-13 12:35:50 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "save_png"  qualifiers= "const" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "int"  enum= "Error"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "0"  name= "path"  type= "String"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-03 01:07:13 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-13 12:35:50 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Saves the image as a PNG file to [code]path[/code].
							 
						 
					
						
							
								
									
										
										
										
											2019-08-03 01:07:13 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
									
										
										
										
											2020-06-04 10:07:56 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "save_png_to_buffer"  qualifiers= "const" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "PackedByteArray"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2020-06-04 10:07:56 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "set_pixel" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "void"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "0"  name= "x"  type= "int"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "1"  name= "y"  type= "int"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "2"  name= "color"  type= "Color"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-21 02:42:29 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Sets the [Color] of the pixel at [code](x, y)[/code] to [code]color[/code]. Example:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												[codeblocks]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												[gdscript]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												var img_width = 10
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												var img_height = 5
							 
						 
					
						
							
								
									
										
										
										
											2017-10-25 11:08:55 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												var img = Image.new()
							 
						 
					
						
							
								
									
										
										
										
											2018-01-06 13:10:37 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												img.create(img_width, img_height, false, Image.FORMAT_RGBA8)
							 
						 
					
						
							
								
									
										
										
										
											2020-11-21 02:42:29 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												img.set_pixel(1, 2, Color.red) # Sets the color at (1, 2) to red.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												[/gdscript]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												[csharp]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												int imgWidth = 10;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												int imgHeight = 5;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												var img = new Image();
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												img.Create(imgWidth, imgHeight, false, Image.Format.Rgba8);
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												img.SetPixel(1, 2, Colors.Red); // Sets the color at (1, 2) to red.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												[/csharp]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												[/codeblocks]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												This is the same as [method set_pixelv], but with a two integer arguments instead of a [Vector2i] argument.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
									
										
										
										
											2018-05-12 09:38:00 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "set_pixelv" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "void"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "0"  name= "point"  type= "Vector2i"  /> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<argument  index= "1"  name= "color"  type= "Color"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2018-05-12 09:38:00 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-21 02:42:29 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Sets the [Color] of the pixel at [code]point[/code] to [code]color[/code]. Example:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												[codeblocks]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												[gdscript]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												var img_width = 10
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												var img_height = 5
							 
						 
					
						
							
								
									
										
										
										
											2019-10-29 01:54:02 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												var img = Image.new()
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												img.create(img_width, img_height, false, Image.FORMAT_RGBA8)
							 
						 
					
						
							
								
									
										
										
										
											2020-11-21 02:42:29 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												img.set_pixelv(Vector2i(1, 2), Color.red) # Sets the color at (1, 2) to red.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												[/gdscript]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												[csharp]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												int imgWidth = 10;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												int imgHeight = 5;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												var img = new Image();
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												img.Create(imgWidth, imgHeight, false, Image.Format.Rgba8);
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												img.SetPixelv(new Vector2i(1, 2), Colors.Red); // Sets the color at (1, 2) to red.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												[/csharp]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												[/codeblocks]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												This is the same as [method set_pixel], but with a [Vector2i] argument instead of two integer arguments.
							 
						 
					
						
							
								
									
										
										
										
											2018-05-12 09:38:00 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "shrink_x2" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "void"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-25 11:08:55 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Shrinks the image by a factor of 2.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<method  name= "srgb_to_linear" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-30 15:28:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											<return  type= "void"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											<description > 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-25 11:08:55 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Converts the raw data from the sRGB colorspace to a linear scale.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</method> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									</methods> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									<members > 
							 
						 
					
						
							
								
									
										
										
										
											2019-09-24 14:45:03 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<member  name= "data"  type= "Dictionary"  setter= "_set_data"  getter= "_get_data"  default= "{"data": PackedByteArray(),"format": "Lum8","height": 0,"mipmaps": false,"width": 0}" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-18 12:04:28 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											Holds all the image's color data in a given format. See [enum Format] constants.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</member> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									</members> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									<constants > 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-12 09:59:06 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "MAX_WIDTH"  value= "16777216" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-03-29 23:37:35 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											The maximal width allowed for [Image] resources.
							 
						 
					
						
							
								
									
										
										
										
											2019-01-28 15:33:56 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-12 09:59:06 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "MAX_HEIGHT"  value= "16777216" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-03-29 23:37:35 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											The maximal height allowed for [Image] resources.
							 
						 
					
						
							
								
									
										
										
										
											2019-01-28 15:33:56 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2017-11-24 23:16:30 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_L8"  value= "0"  enum= "Format" > 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-14 13:27:14 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											Texture format with a single 8-bit depth representing luminance.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2017-11-24 23:16:30 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_LA8"  value= "1"  enum= "Format" > 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-14 13:27:14 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											OpenGL texture format with two values, luminance and alpha each stored with 8 bits.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2017-11-24 23:16:30 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_R8"  value= "2"  enum= "Format" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											OpenGL texture format [code]RED[/code] with a single component and a bitdepth of 8.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2017-11-24 23:16:30 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_RG8"  value= "3"  enum= "Format" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											OpenGL texture format [code]RG[/code] with two components and a bitdepth of 8 for each.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2017-11-24 23:16:30 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_RGB8"  value= "4"  enum= "Format" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											OpenGL texture format [code]RGB[/code] with three components, each with a bitdepth of 8.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											[b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2017-11-24 23:16:30 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_RGBA8"  value= "5"  enum= "Format" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											OpenGL texture format [code]RGBA[/code] with four components, each with a bitdepth of 8.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											[b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2017-11-24 23:16:30 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_RGBA4444"  value= "6"  enum= "Format" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											OpenGL texture format [code]RGBA[/code] with four components, each with a bitdepth of 4.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-12 09:59:06 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_RGB565"  value= "7"  enum= "Format" > 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2018-01-04 01:48:24 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_RF"  value= "8"  enum= "Format" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											OpenGL texture format [code]GL_R32F[/code] where there's one component, a 32-bit floating-point value.
							 
						 
					
						
							
								
									
										
										
										
											2018-01-03 13:45:03 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2018-01-04 01:48:24 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_RGF"  value= "9"  enum= "Format" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											OpenGL texture format [code]GL_RG32F[/code] where there are two components, each a 32-bit floating-point values.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2018-01-04 01:48:24 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_RGBF"  value= "10"  enum= "Format" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											OpenGL texture format [code]GL_RGB32F[/code] where there are three components, each a 32-bit floating-point values.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2018-01-04 01:48:24 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_RGBAF"  value= "11"  enum= "Format" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											OpenGL texture format [code]GL_RGBA32F[/code] where there are four components, each a 32-bit floating-point values.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2018-01-04 01:48:24 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_RH"  value= "12"  enum= "Format" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											OpenGL texture format [code]GL_R32F[/code] where there's one component, a 16-bit "half-precision" floating-point value.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2018-01-04 01:48:24 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_RGH"  value= "13"  enum= "Format" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											OpenGL texture format [code]GL_RG32F[/code] where there are two components, each a 16-bit "half-precision" floating-point value.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2018-01-04 01:48:24 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_RGBH"  value= "14"  enum= "Format" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											OpenGL texture format [code]GL_RGB32F[/code] where there are three components, each a 16-bit "half-precision" floating-point value.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2018-01-04 01:48:24 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_RGBAH"  value= "15"  enum= "Format" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											OpenGL texture format [code]GL_RGBA32F[/code] where there are four components, each a 16-bit "half-precision" floating-point value.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2018-01-04 01:48:24 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_RGBE9995"  value= "16"  enum= "Format" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											A special OpenGL texture format where the three color components have 9 bits of precision and all three share a single 5-bit exponent.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2018-01-04 01:48:24 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_DXT1"  value= "17"  enum= "Format" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											The [url=https://en.wikipedia.org/wiki/S3_Texture_Compression]S3TC[/url] texture format that uses Block Compression 1, and is the smallest variation of S3TC, only providing 1 bit of alpha and color data being premultiplied with alpha.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											[b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2018-01-04 01:48:24 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_DXT3"  value= "18"  enum= "Format" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											The [url=https://en.wikipedia.org/wiki/S3_Texture_Compression]S3TC[/url] texture format that uses Block Compression 2, and color data is interpreted as not having been premultiplied by alpha. Well suited for images with sharp alpha transitions between translucent and opaque areas.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											[b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2018-01-04 01:48:24 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_DXT5"  value= "19"  enum= "Format" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											The [url=https://en.wikipedia.org/wiki/S3_Texture_Compression]S3TC[/url] texture format also known as Block Compression 3 or BC3 that contains 64 bits of alpha channel data followed by 64 bits of DXT1-encoded color data. Color data is not premultiplied by alpha, same as DXT3. DXT5 generally produces superior results for transparent gradients compared to DXT3.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											[b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2018-01-04 01:48:24 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_RGTC_R"  value= "20"  enum= "Format" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											Texture format that uses [url=https://www.khronos.org/opengl/wiki/Red_Green_Texture_Compression]Red Green Texture Compression[/url], normalizing the red channel data using the same compression algorithm that DXT5 uses for the alpha channel.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2018-01-04 01:48:24 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_RGTC_RG"  value= "21"  enum= "Format" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											Texture format that uses [url=https://www.khronos.org/opengl/wiki/Red_Green_Texture_Compression]Red Green Texture Compression[/url], normalizing the red and green channel data using the same compression algorithm that DXT5 uses for the alpha channel.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2018-01-04 01:48:24 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_BPTC_RGBA"  value= "22"  enum= "Format" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											Texture format that uses [url=https://www.khronos.org/opengl/wiki/BPTC_Texture_Compression]BPTC[/url] compression with unsigned normalized RGBA components.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											[b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2018-01-04 01:48:24 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_BPTC_RGBF"  value= "23"  enum= "Format" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											Texture format that uses [url=https://www.khronos.org/opengl/wiki/BPTC_Texture_Compression]BPTC[/url] compression with signed floating-point RGB components.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2018-01-04 01:48:24 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_BPTC_RGBFU"  value= "24"  enum= "Format" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											Texture format that uses [url=https://www.khronos.org/opengl/wiki/BPTC_Texture_Compression]BPTC[/url] compression with unsigned floating-point RGB components.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-10 23:01:00 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_PVRTC1_2"  value= "25"  enum= "Format" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											Texture format used on PowerVR-supported mobile platforms, uses 2-bit color depth with no alpha. More information can be found [url=https://en.wikipedia.org/wiki/PVRTC]here[/url].
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											[b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-10 23:01:00 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_PVRTC1_2A"  value= "26"  enum= "Format" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											Same as [constant FORMAT_PVRTC1_2], but with an alpha component.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-10 23:01:00 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_PVRTC1_4"  value= "27"  enum= "Format" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											Texture format used on PowerVR-supported mobile platforms, uses 4-bit color depth with no alpha. More information can be found [url=https://en.wikipedia.org/wiki/PVRTC]here[/url].
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											[b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-10 23:01:00 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_PVRTC1_4A"  value= "28"  enum= "Format" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											Same as [constant FORMAT_PVRTC1_4], but with an alpha component.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2018-01-04 01:48:24 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_ETC"  value= "29"  enum= "Format" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											[url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC1]Ericsson Texture Compression format 1[/url], also referred to as "ETC1", and is part of the OpenGL ES graphics standard. This format cannot store an alpha channel.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2018-01-04 01:48:24 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_ETC2_R11"  value= "30"  enum= "Format" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											[url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] ([code]R11_EAC[/code] variant), which provides one channel of unsigned data.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2018-01-04 01:48:24 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_ETC2_R11S"  value= "31"  enum= "Format" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											[url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] ([code]SIGNED_R11_EAC[/code] variant), which provides one channel of signed data.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2018-01-04 01:48:24 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_ETC2_RG11"  value= "32"  enum= "Format" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											[url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] ([code]RG11_EAC[/code] variant), which provides two channels of unsigned data.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2018-01-04 01:48:24 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_ETC2_RG11S"  value= "33"  enum= "Format" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											[url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] ([code]SIGNED_RG11_EAC[/code] variant), which provides two channels of signed data.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2018-01-04 01:48:24 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_ETC2_RGB8"  value= "34"  enum= "Format" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											[url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] ([code]RGB8[/code] variant), which is a follow-up of ETC1 and compresses RGB888 data.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											[b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2018-01-04 01:48:24 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_ETC2_RGBA8"  value= "35"  enum= "Format" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											[url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] ([code]RGBA8[/code]variant), which compresses RGBA8888 data with full alpha support.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											[b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2018-01-04 01:48:24 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_ETC2_RGB8A1"  value= "36"  enum= "Format" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											[url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] ([code]RGB8_PUNCHTHROUGH_ALPHA1[/code] variant), which compresses RGBA data to make alpha either fully transparent or fully opaque.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											[b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-12 09:59:06 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_ETC2_RA_AS_RG"  value= "37"  enum= "Format" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_DXT5_RA_AS_RG"  value= "38"  enum= "Format" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "FORMAT_MAX"  value= "39"  enum= "Format" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-27 11:10:53 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											Represents the size of the [enum Format] enum.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2017-11-24 23:16:30 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "INTERPOLATE_NEAREST"  value= "0"  enum= "Interpolation" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											Performs nearest-neighbor interpolation. If the image is resized, it will be pixelated.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2017-11-24 23:16:30 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "INTERPOLATE_BILINEAR"  value= "1"  enum= "Interpolation" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											Performs bilinear interpolation. If the image is resized, it will be blurry. This mode is faster than [constant INTERPOLATE_CUBIC], but it results in lower quality.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2017-11-24 23:16:30 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "INTERPOLATE_CUBIC"  value= "2"  enum= "Interpolation" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											Performs cubic interpolation. If the image is resized, it will be blurry. This mode often gives better results compared to [constant INTERPOLATE_BILINEAR], at the cost of being slower.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2018-06-01 21:53:35 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "INTERPOLATE_TRILINEAR"  value= "3"  enum= "Interpolation" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											Performs bilinear separately on the two most-suited mipmap levels, then linearly interpolates between them.
							 
						 
					
						
							
								
									
										
										
										
											2021-07-22 12:12:25 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											It's slower than [constant INTERPOLATE_BILINEAR], but produces higher-quality results with far fewer aliasing artifacts.
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											If the image does not have mipmaps, they will be generated and used internally, but no mipmaps will be generated on the resulting image.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											[b]Note:[/b] If you intend to scale multiple copies of the original image, it's better to call [method generate_mipmaps]] on it in advance, to avoid wasting processing power in generating them again and again.
							 
						 
					
						
							
								
									
										
										
										
											2018-06-01 21:53:35 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											On the other hand, if the image already has mipmaps, they will be used, and a new set will be generated for the resulting image.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-05 14:03:52 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "INTERPOLATE_LANCZOS"  value= "4"  enum= "Interpolation" > 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-22 01:04:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											Performs Lanczos interpolation. This is the slowest image resizing mode, but it typically gives the best results, especially when downscalng images.
							 
						 
					
						
							
								
									
										
										
										
											2019-05-05 14:03:52 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2017-11-24 23:16:30 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "ALPHA_NONE"  value= "0"  enum= "AlphaMode" > 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-14 13:27:14 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											Image does not have alpha.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2017-11-24 23:16:30 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "ALPHA_BIT"  value= "1"  enum= "AlphaMode" > 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-14 13:27:14 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											Image stores alpha in a single bit.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2017-11-24 23:16:30 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "ALPHA_BLEND"  value= "2"  enum= "AlphaMode" > 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-14 13:27:14 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											Image uses alpha.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2017-11-24 23:16:30 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "COMPRESS_S3TC"  value= "0"  enum= "CompressMode" > 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-14 13:27:14 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											Use S3TC compression.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-10 23:01:00 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "COMPRESS_PVRTC1_4"  value= "1"  enum= "CompressMode" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											Use PVRTC1 4-bpp compression.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-10 23:01:00 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "COMPRESS_ETC"  value= "2"  enum= "CompressMode" > 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-14 13:27:14 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											Use ETC compression.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-10 23:01:00 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "COMPRESS_ETC2"  value= "3"  enum= "CompressMode" > 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-14 13:27:14 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											Use ETC2 compression.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-10 23:01:00 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "COMPRESS_BPTC"  value= "4"  enum= "CompressMode" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											Use BPTC compression.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-12 09:59:06 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "USED_CHANNELS_L"  value= "0"  enum= "UsedChannels" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "USED_CHANNELS_LA"  value= "1"  enum= "UsedChannels" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "USED_CHANNELS_R"  value= "2"  enum= "UsedChannels" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "USED_CHANNELS_RG"  value= "3"  enum= "UsedChannels" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "USED_CHANNELS_RGB"  value= "4"  enum= "UsedChannels" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "USED_CHANNELS_RGBA"  value= "5"  enum= "UsedChannels" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2017-11-24 23:16:30 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "COMPRESS_SOURCE_GENERIC"  value= "0"  enum= "CompressSource" > 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-14 13:27:14 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											Source texture (before compression) is a regular texture. Default for all textures.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2017-11-24 23:16:30 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "COMPRESS_SOURCE_SRGB"  value= "1"  enum= "CompressSource" > 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-14 13:27:14 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											Source texture (before compression) is in sRGB space.
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2017-11-24 23:16:30 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										<constant  name= "COMPRESS_SOURCE_NORMAL"  value= "2"  enum= "CompressSource" > 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-14 13:27:14 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											Source texture (before compression) is a normal texture (e.g. it can be compressed into two channels).
							 
						 
					
						
							
								
									
										
										
										
											2017-09-12 17:42:36 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										</constant> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									</constants> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								</class>