|
@@ -38,135 +38,137 @@ Properties
|
|
|
Methods
|
|
|
-------
|
|
|
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`adjust_bcs<class_Image_method_adjust_bcs>` **(** :ref:`float<class_float>` brightness, :ref:`float<class_float>` contrast, :ref:`float<class_float>` saturation **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`blend_rect<class_Image_method_blend_rect>` **(** :ref:`Image<class_Image>` src, :ref:`Rect2i<class_Rect2i>` src_rect, :ref:`Vector2i<class_Vector2i>` dst **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`blend_rect_mask<class_Image_method_blend_rect_mask>` **(** :ref:`Image<class_Image>` src, :ref:`Image<class_Image>` mask, :ref:`Rect2i<class_Rect2i>` src_rect, :ref:`Vector2i<class_Vector2i>` dst **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`blit_rect<class_Image_method_blit_rect>` **(** :ref:`Image<class_Image>` src, :ref:`Rect2i<class_Rect2i>` src_rect, :ref:`Vector2i<class_Vector2i>` dst **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`blit_rect_mask<class_Image_method_blit_rect_mask>` **(** :ref:`Image<class_Image>` src, :ref:`Image<class_Image>` mask, :ref:`Rect2i<class_Rect2i>` src_rect, :ref:`Vector2i<class_Vector2i>` dst **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`bump_map_to_normal_map<class_Image_method_bump_map_to_normal_map>` **(** :ref:`float<class_float>` bump_scale=1.0 **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`clear_mipmaps<class_Image_method_clear_mipmaps>` **(** **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`compress<class_Image_method_compress>` **(** :ref:`CompressMode<enum_Image_CompressMode>` mode, :ref:`CompressSource<enum_Image_CompressSource>` source=0, :ref:`float<class_float>` lossy_quality=0.7 **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`compress_from_channels<class_Image_method_compress_from_channels>` **(** :ref:`CompressMode<enum_Image_CompressMode>` mode, :ref:`UsedChannels<enum_Image_UsedChannels>` channels, :ref:`float<class_float>` lossy_quality=0.7 **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Dictionary<class_Dictionary>` | :ref:`compute_image_metrics<class_Image_method_compute_image_metrics>` **(** :ref:`Image<class_Image>` compared_image, :ref:`bool<class_bool>` use_luma **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`convert<class_Image_method_convert>` **(** :ref:`Format<enum_Image_Format>` format **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`copy_from<class_Image_method_copy_from>` **(** :ref:`Image<class_Image>` src **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`create<class_Image_method_create>` **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`bool<class_bool>` use_mipmaps, :ref:`Format<enum_Image_Format>` format **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`create_from_data<class_Image_method_create_from_data>` **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`bool<class_bool>` use_mipmaps, :ref:`Format<enum_Image_Format>` format, :ref:`PackedByteArray<class_PackedByteArray>` data **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`crop<class_Image_method_crop>` **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`decompress<class_Image_method_decompress>` **(** **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`AlphaMode<enum_Image_AlphaMode>` | :ref:`detect_alpha<class_Image_method_detect_alpha>` **(** **)** |const| |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`UsedChannels<enum_Image_UsedChannels>` | :ref:`detect_used_channels<class_Image_method_detect_used_channels>` **(** :ref:`CompressSource<enum_Image_CompressSource>` source=0 **)** |const| |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`fill<class_Image_method_fill>` **(** :ref:`Color<class_Color>` color **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`fill_rect<class_Image_method_fill_rect>` **(** :ref:`Rect2i<class_Rect2i>` rect, :ref:`Color<class_Color>` color **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`fix_alpha_edges<class_Image_method_fix_alpha_edges>` **(** **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`flip_x<class_Image_method_flip_x>` **(** **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`flip_y<class_Image_method_flip_y>` **(** **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`generate_mipmaps<class_Image_method_generate_mipmaps>` **(** :ref:`bool<class_bool>` renormalize=false **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`get_data<class_Image_method_get_data>` **(** **)** |const| |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Format<enum_Image_Format>` | :ref:`get_format<class_Image_method_get_format>` **(** **)** |const| |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`int<class_int>` | :ref:`get_height<class_Image_method_get_height>` **(** **)** |const| |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`int<class_int>` | :ref:`get_mipmap_offset<class_Image_method_get_mipmap_offset>` **(** :ref:`int<class_int>` mipmap **)** |const| |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Color<class_Color>` | :ref:`get_pixel<class_Image_method_get_pixel>` **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y **)** |const| |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Color<class_Color>` | :ref:`get_pixelv<class_Image_method_get_pixelv>` **(** :ref:`Vector2i<class_Vector2i>` point **)** |const| |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Image<class_Image>` | :ref:`get_rect<class_Image_method_get_rect>` **(** :ref:`Rect2i<class_Rect2i>` rect **)** |const| |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Vector2i<class_Vector2i>` | :ref:`get_size<class_Image_method_get_size>` **(** **)** |const| |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Rect2i<class_Rect2i>` | :ref:`get_used_rect<class_Image_method_get_used_rect>` **(** **)** |const| |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`int<class_int>` | :ref:`get_width<class_Image_method_get_width>` **(** **)** |const| |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`bool<class_bool>` | :ref:`has_mipmaps<class_Image_method_has_mipmaps>` **(** **)** |const| |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`bool<class_bool>` | :ref:`is_compressed<class_Image_method_is_compressed>` **(** **)** |const| |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`bool<class_bool>` | :ref:`is_empty<class_Image_method_is_empty>` **(** **)** |const| |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`bool<class_bool>` | :ref:`is_invisible<class_Image_method_is_invisible>` **(** **)** |const| |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load<class_Image_method_load>` **(** :ref:`String<class_String>` path **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_bmp_from_buffer<class_Image_method_load_bmp_from_buffer>` **(** :ref:`PackedByteArray<class_PackedByteArray>` buffer **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Image<class_Image>` | :ref:`load_from_file<class_Image_method_load_from_file>` **(** :ref:`String<class_String>` path **)** |static| |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_jpg_from_buffer<class_Image_method_load_jpg_from_buffer>` **(** :ref:`PackedByteArray<class_PackedByteArray>` buffer **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_png_from_buffer<class_Image_method_load_png_from_buffer>` **(** :ref:`PackedByteArray<class_PackedByteArray>` buffer **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_tga_from_buffer<class_Image_method_load_tga_from_buffer>` **(** :ref:`PackedByteArray<class_PackedByteArray>` buffer **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_webp_from_buffer<class_Image_method_load_webp_from_buffer>` **(** :ref:`PackedByteArray<class_PackedByteArray>` buffer **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`normal_map_to_xy<class_Image_method_normal_map_to_xy>` **(** **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`premultiply_alpha<class_Image_method_premultiply_alpha>` **(** **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`resize<class_Image_method_resize>` **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`Interpolation<enum_Image_Interpolation>` interpolation=1 **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`resize_to_po2<class_Image_method_resize_to_po2>` **(** :ref:`bool<class_bool>` square=false, :ref:`Interpolation<enum_Image_Interpolation>` interpolation=1 **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Image<class_Image>` | :ref:`rgbe_to_srgb<class_Image_method_rgbe_to_srgb>` **(** **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`rotate_180<class_Image_method_rotate_180>` **(** **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`rotate_90<class_Image_method_rotate_90>` **(** :ref:`ClockDirection<enum_@GlobalScope_ClockDirection>` direction **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save_exr<class_Image_method_save_exr>` **(** :ref:`String<class_String>` path, :ref:`bool<class_bool>` grayscale=false **)** |const| |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`save_exr_to_buffer<class_Image_method_save_exr_to_buffer>` **(** :ref:`bool<class_bool>` grayscale=false **)** |const| |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save_jpg<class_Image_method_save_jpg>` **(** :ref:`String<class_String>` path, :ref:`float<class_float>` quality=0.75 **)** |const| |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`save_jpg_to_buffer<class_Image_method_save_jpg_to_buffer>` **(** :ref:`float<class_float>` quality=0.75 **)** |const| |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save_png<class_Image_method_save_png>` **(** :ref:`String<class_String>` path **)** |const| |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`save_png_to_buffer<class_Image_method_save_png_to_buffer>` **(** **)** |const| |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save_webp<class_Image_method_save_webp>` **(** :ref:`String<class_String>` path, :ref:`bool<class_bool>` lossy=false, :ref:`float<class_float>` quality=0.75 **)** |const| |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`save_webp_to_buffer<class_Image_method_save_webp_to_buffer>` **(** :ref:`bool<class_bool>` lossy=false, :ref:`float<class_float>` quality=0.75 **)** |const| |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`set_pixel<class_Image_method_set_pixel>` **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y, :ref:`Color<class_Color>` color **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`set_pixelv<class_Image_method_set_pixelv>` **(** :ref:`Vector2i<class_Vector2i>` point, :ref:`Color<class_Color>` color **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`shrink_x2<class_Image_method_shrink_x2>` **(** **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`srgb_to_linear<class_Image_method_srgb_to_linear>` **(** **)** |
|
|
|
-+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`adjust_bcs<class_Image_method_adjust_bcs>` **(** :ref:`float<class_float>` brightness, :ref:`float<class_float>` contrast, :ref:`float<class_float>` saturation **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`blend_rect<class_Image_method_blend_rect>` **(** :ref:`Image<class_Image>` src, :ref:`Rect2i<class_Rect2i>` src_rect, :ref:`Vector2i<class_Vector2i>` dst **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`blend_rect_mask<class_Image_method_blend_rect_mask>` **(** :ref:`Image<class_Image>` src, :ref:`Image<class_Image>` mask, :ref:`Rect2i<class_Rect2i>` src_rect, :ref:`Vector2i<class_Vector2i>` dst **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`blit_rect<class_Image_method_blit_rect>` **(** :ref:`Image<class_Image>` src, :ref:`Rect2i<class_Rect2i>` src_rect, :ref:`Vector2i<class_Vector2i>` dst **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`blit_rect_mask<class_Image_method_blit_rect_mask>` **(** :ref:`Image<class_Image>` src, :ref:`Image<class_Image>` mask, :ref:`Rect2i<class_Rect2i>` src_rect, :ref:`Vector2i<class_Vector2i>` dst **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`bump_map_to_normal_map<class_Image_method_bump_map_to_normal_map>` **(** :ref:`float<class_float>` bump_scale=1.0 **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`clear_mipmaps<class_Image_method_clear_mipmaps>` **(** **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`compress<class_Image_method_compress>` **(** :ref:`CompressMode<enum_Image_CompressMode>` mode, :ref:`CompressSource<enum_Image_CompressSource>` source=0, :ref:`float<class_float>` lossy_quality=0.7 **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`compress_from_channels<class_Image_method_compress_from_channels>` **(** :ref:`CompressMode<enum_Image_CompressMode>` mode, :ref:`UsedChannels<enum_Image_UsedChannels>` channels, :ref:`float<class_float>` lossy_quality=0.7 **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Dictionary<class_Dictionary>` | :ref:`compute_image_metrics<class_Image_method_compute_image_metrics>` **(** :ref:`Image<class_Image>` compared_image, :ref:`bool<class_bool>` use_luma **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`convert<class_Image_method_convert>` **(** :ref:`Format<enum_Image_Format>` format **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`copy_from<class_Image_method_copy_from>` **(** :ref:`Image<class_Image>` src **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Image<class_Image>` | :ref:`create<class_Image_method_create>` **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`bool<class_bool>` use_mipmaps, :ref:`Format<enum_Image_Format>` format **)** |static| |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Image<class_Image>` | :ref:`create_from_data<class_Image_method_create_from_data>` **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`bool<class_bool>` use_mipmaps, :ref:`Format<enum_Image_Format>` format, :ref:`PackedByteArray<class_PackedByteArray>` data **)** |static| |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`crop<class_Image_method_crop>` **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`decompress<class_Image_method_decompress>` **(** **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`AlphaMode<enum_Image_AlphaMode>` | :ref:`detect_alpha<class_Image_method_detect_alpha>` **(** **)** |const| |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`UsedChannels<enum_Image_UsedChannels>` | :ref:`detect_used_channels<class_Image_method_detect_used_channels>` **(** :ref:`CompressSource<enum_Image_CompressSource>` source=0 **)** |const| |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`fill<class_Image_method_fill>` **(** :ref:`Color<class_Color>` color **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`fill_rect<class_Image_method_fill_rect>` **(** :ref:`Rect2i<class_Rect2i>` rect, :ref:`Color<class_Color>` color **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`fix_alpha_edges<class_Image_method_fix_alpha_edges>` **(** **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`flip_x<class_Image_method_flip_x>` **(** **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`flip_y<class_Image_method_flip_y>` **(** **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`generate_mipmaps<class_Image_method_generate_mipmaps>` **(** :ref:`bool<class_bool>` renormalize=false **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`get_data<class_Image_method_get_data>` **(** **)** |const| |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Format<enum_Image_Format>` | :ref:`get_format<class_Image_method_get_format>` **(** **)** |const| |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`int<class_int>` | :ref:`get_height<class_Image_method_get_height>` **(** **)** |const| |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`int<class_int>` | :ref:`get_mipmap_offset<class_Image_method_get_mipmap_offset>` **(** :ref:`int<class_int>` mipmap **)** |const| |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Color<class_Color>` | :ref:`get_pixel<class_Image_method_get_pixel>` **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y **)** |const| |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Color<class_Color>` | :ref:`get_pixelv<class_Image_method_get_pixelv>` **(** :ref:`Vector2i<class_Vector2i>` point **)** |const| |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Image<class_Image>` | :ref:`get_region<class_Image_method_get_region>` **(** :ref:`Rect2i<class_Rect2i>` region **)** |const| |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Vector2i<class_Vector2i>` | :ref:`get_size<class_Image_method_get_size>` **(** **)** |const| |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Rect2i<class_Rect2i>` | :ref:`get_used_rect<class_Image_method_get_used_rect>` **(** **)** |const| |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`int<class_int>` | :ref:`get_width<class_Image_method_get_width>` **(** **)** |const| |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`bool<class_bool>` | :ref:`has_mipmaps<class_Image_method_has_mipmaps>` **(** **)** |const| |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`bool<class_bool>` | :ref:`is_compressed<class_Image_method_is_compressed>` **(** **)** |const| |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`bool<class_bool>` | :ref:`is_empty<class_Image_method_is_empty>` **(** **)** |const| |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`bool<class_bool>` | :ref:`is_invisible<class_Image_method_is_invisible>` **(** **)** |const| |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load<class_Image_method_load>` **(** :ref:`String<class_String>` path **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_bmp_from_buffer<class_Image_method_load_bmp_from_buffer>` **(** :ref:`PackedByteArray<class_PackedByteArray>` buffer **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Image<class_Image>` | :ref:`load_from_file<class_Image_method_load_from_file>` **(** :ref:`String<class_String>` path **)** |static| |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_jpg_from_buffer<class_Image_method_load_jpg_from_buffer>` **(** :ref:`PackedByteArray<class_PackedByteArray>` buffer **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_png_from_buffer<class_Image_method_load_png_from_buffer>` **(** :ref:`PackedByteArray<class_PackedByteArray>` buffer **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_tga_from_buffer<class_Image_method_load_tga_from_buffer>` **(** :ref:`PackedByteArray<class_PackedByteArray>` buffer **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_webp_from_buffer<class_Image_method_load_webp_from_buffer>` **(** :ref:`PackedByteArray<class_PackedByteArray>` buffer **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`normal_map_to_xy<class_Image_method_normal_map_to_xy>` **(** **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`premultiply_alpha<class_Image_method_premultiply_alpha>` **(** **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`resize<class_Image_method_resize>` **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`Interpolation<enum_Image_Interpolation>` interpolation=1 **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`resize_to_po2<class_Image_method_resize_to_po2>` **(** :ref:`bool<class_bool>` square=false, :ref:`Interpolation<enum_Image_Interpolation>` interpolation=1 **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Image<class_Image>` | :ref:`rgbe_to_srgb<class_Image_method_rgbe_to_srgb>` **(** **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`rotate_180<class_Image_method_rotate_180>` **(** **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`rotate_90<class_Image_method_rotate_90>` **(** :ref:`ClockDirection<enum_@GlobalScope_ClockDirection>` direction **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save_exr<class_Image_method_save_exr>` **(** :ref:`String<class_String>` path, :ref:`bool<class_bool>` grayscale=false **)** |const| |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`save_exr_to_buffer<class_Image_method_save_exr_to_buffer>` **(** :ref:`bool<class_bool>` grayscale=false **)** |const| |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save_jpg<class_Image_method_save_jpg>` **(** :ref:`String<class_String>` path, :ref:`float<class_float>` quality=0.75 **)** |const| |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`save_jpg_to_buffer<class_Image_method_save_jpg_to_buffer>` **(** :ref:`float<class_float>` quality=0.75 **)** |const| |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save_png<class_Image_method_save_png>` **(** :ref:`String<class_String>` path **)** |const| |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`save_png_to_buffer<class_Image_method_save_png_to_buffer>` **(** **)** |const| |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save_webp<class_Image_method_save_webp>` **(** :ref:`String<class_String>` path, :ref:`bool<class_bool>` lossy=false, :ref:`float<class_float>` quality=0.75 **)** |const| |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`save_webp_to_buffer<class_Image_method_save_webp_to_buffer>` **(** :ref:`bool<class_bool>` lossy=false, :ref:`float<class_float>` quality=0.75 **)** |const| |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`set_data<class_Image_method_set_data>` **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`bool<class_bool>` use_mipmaps, :ref:`Format<enum_Image_Format>` format, :ref:`PackedByteArray<class_PackedByteArray>` data **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`set_pixel<class_Image_method_set_pixel>` **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y, :ref:`Color<class_Color>` color **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`set_pixelv<class_Image_method_set_pixelv>` **(** :ref:`Vector2i<class_Vector2i>` point, :ref:`Color<class_Color>` color **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`shrink_x2<class_Image_method_shrink_x2>` **(** **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`srgb_to_linear<class_Image_method_srgb_to_linear>` **(** **)** |
|
|
|
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
|
|
Enumerations
|
|
|
------------
|
|
@@ -496,7 +498,7 @@ Method Descriptions
|
|
|
|
|
|
- void **blend_rect** **(** :ref:`Image<class_Image>` src, :ref:`Rect2i<class_Rect2i>` src_rect, :ref:`Vector2i<class_Vector2i>` dst **)**
|
|
|
|
|
|
-Alpha-blends ``src_rect`` from ``src`` image to this image at coordinates ``dst``, clipped accordingly to both image bounds. This image and ``src`` image **must** have the same format. ``src_rect`` with not positive size is treated as empty.
|
|
|
+Alpha-blends ``src_rect`` from ``src`` image to this image at coordinates ``dst``, clipped accordingly to both image bounds. This image and ``src`` image **must** have the same format. ``src_rect`` with non-positive size is treated as empty.
|
|
|
|
|
|
----
|
|
|
|
|
@@ -504,7 +506,7 @@ Alpha-blends ``src_rect`` from ``src`` image to this image at coordinates ``dst`
|
|
|
|
|
|
- void **blend_rect_mask** **(** :ref:`Image<class_Image>` src, :ref:`Image<class_Image>` mask, :ref:`Rect2i<class_Rect2i>` src_rect, :ref:`Vector2i<class_Vector2i>` dst **)**
|
|
|
|
|
|
-Alpha-blends ``src_rect`` from ``src`` image to this image using ``mask`` image at coordinates ``dst``, clipped accordingly to both image bounds. Alpha channels are required for both ``src`` and ``mask``. ``dst`` pixels and ``src`` pixels will blend if the corresponding mask pixel's alpha value is not 0. This image and ``src`` image **must** have the same format. ``src`` image and ``mask`` image **must** have the same size (width and height) but they can have different formats. ``src_rect`` with not positive size is treated as empty.
|
|
|
+Alpha-blends ``src_rect`` from ``src`` image to this image using ``mask`` image at coordinates ``dst``, clipped accordingly to both image bounds. Alpha channels are required for both ``src`` and ``mask``. ``dst`` pixels and ``src`` pixels will blend if the corresponding mask pixel's alpha value is not 0. This image and ``src`` image **must** have the same format. ``src`` image and ``mask`` image **must** have the same size (width and height) but they can have different formats. ``src_rect`` with non-positive size is treated as empty.
|
|
|
|
|
|
----
|
|
|
|
|
@@ -512,7 +514,7 @@ Alpha-blends ``src_rect`` from ``src`` image to this image using ``mask`` image
|
|
|
|
|
|
- void **blit_rect** **(** :ref:`Image<class_Image>` src, :ref:`Rect2i<class_Rect2i>` src_rect, :ref:`Vector2i<class_Vector2i>` dst **)**
|
|
|
|
|
|
-Copies ``src_rect`` from ``src`` image to this image at coordinates ``dst``, clipped accordingly to both image bounds. This image and ``src`` image **must** have the same format. ``src_rect`` with not positive size is treated as empty.
|
|
|
+Copies ``src_rect`` from ``src`` image to this image at coordinates ``dst``, clipped accordingly to both image bounds. This image and ``src`` image **must** have the same format. ``src_rect`` with non-positive size is treated as empty.
|
|
|
|
|
|
----
|
|
|
|
|
@@ -520,7 +522,7 @@ Copies ``src_rect`` from ``src`` image to this image at coordinates ``dst``, cli
|
|
|
|
|
|
- void **blit_rect_mask** **(** :ref:`Image<class_Image>` src, :ref:`Image<class_Image>` mask, :ref:`Rect2i<class_Rect2i>` src_rect, :ref:`Vector2i<class_Vector2i>` dst **)**
|
|
|
|
|
|
-Blits ``src_rect`` area from ``src`` image to this image at the coordinates given by ``dst``, clipped accordingly to both image bounds. ``src`` pixel is copied onto ``dst`` if the corresponding ``mask`` pixel's alpha value is not 0. This image and ``src`` image **must** have the same format. ``src`` image and ``mask`` image **must** have the same size (width and height) but they can have different formats. ``src_rect`` with not positive size is treated as empty.
|
|
|
+Blits ``src_rect`` area from ``src`` image to this image at the coordinates given by ``dst``, clipped accordingly to both image bounds. ``src`` pixel is copied onto ``dst`` if the corresponding ``mask`` pixel's alpha value is not 0. This image and ``src`` image **must** have the same format. ``src`` image and ``mask`` image **must** have the same size (width and height) but they can have different formats. ``src_rect`` with non-positive size is treated as empty.
|
|
|
|
|
|
----
|
|
|
|
|
@@ -582,7 +584,7 @@ Copies ``src`` image to this image.
|
|
|
|
|
|
.. _class_Image_method_create:
|
|
|
|
|
|
-- void **create** **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`bool<class_bool>` use_mipmaps, :ref:`Format<enum_Image_Format>` format **)**
|
|
|
+- :ref:`Image<class_Image>` **create** **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`bool<class_bool>` use_mipmaps, :ref:`Format<enum_Image_Format>` format **)** |static|
|
|
|
|
|
|
Creates an empty image of given size and format. See :ref:`Format<enum_Image_Format>` constants. If ``use_mipmaps`` is ``true`` then generate mipmaps for this image. See the :ref:`generate_mipmaps<class_Image_method_generate_mipmaps>`.
|
|
|
|
|
@@ -590,7 +592,7 @@ Creates an empty image of given size and format. See :ref:`Format<enum_Image_For
|
|
|
|
|
|
.. _class_Image_method_create_from_data:
|
|
|
|
|
|
-- void **create_from_data** **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`bool<class_bool>` use_mipmaps, :ref:`Format<enum_Image_Format>` format, :ref:`PackedByteArray<class_PackedByteArray>` data **)**
|
|
|
+- :ref:`Image<class_Image>` **create_from_data** **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`bool<class_bool>` use_mipmaps, :ref:`Format<enum_Image_Format>` format, :ref:`PackedByteArray<class_PackedByteArray>` data **)** |static|
|
|
|
|
|
|
Creates a new image of given size and format. See :ref:`Format<enum_Image_Format>` constants. Fills the image with the given raw data. If ``use_mipmaps`` is ``true`` then loads mipmaps for this image from ``data``. See :ref:`generate_mipmaps<class_Image_method_generate_mipmaps>`.
|
|
|
|
|
@@ -728,11 +730,11 @@ This is the same as :ref:`get_pixel<class_Image_method_get_pixel>`, but with a :
|
|
|
|
|
|
----
|
|
|
|
|
|
-.. _class_Image_method_get_rect:
|
|
|
+.. _class_Image_method_get_region:
|
|
|
|
|
|
-- :ref:`Image<class_Image>` **get_rect** **(** :ref:`Rect2i<class_Rect2i>` rect **)** |const|
|
|
|
+- :ref:`Image<class_Image>` **get_region** **(** :ref:`Rect2i<class_Rect2i>` region **)** |const|
|
|
|
|
|
|
-Returns a new image that is a copy of the image's area specified with ``rect``.
|
|
|
+Returns a new ``Image`` that is a copy of this ``Image``'s area specified with ``region``.
|
|
|
|
|
|
----
|
|
|
|
|
@@ -982,11 +984,21 @@ Saves the image as a WebP (Web Picture) file to a byte array. By default it will
|
|
|
|
|
|
----
|
|
|
|
|
|
+.. _class_Image_method_set_data:
|
|
|
+
|
|
|
+- void **set_data** **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`bool<class_bool>` use_mipmaps, :ref:`Format<enum_Image_Format>` format, :ref:`PackedByteArray<class_PackedByteArray>` data **)**
|
|
|
+
|
|
|
+Overwrites data of an existing ``Image``. Non-static equivalent of :ref:`create_from_data<class_Image_method_create_from_data>`.
|
|
|
+
|
|
|
+----
|
|
|
+
|
|
|
.. _class_Image_method_set_pixel:
|
|
|
|
|
|
- void **set_pixel** **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y, :ref:`Color<class_Color>` color **)**
|
|
|
|
|
|
-Sets the :ref:`Color<class_Color>` of the pixel at ``(x, y)`` to ``color``. Example:
|
|
|
+Sets the :ref:`Color<class_Color>` of the pixel at ``(x, y)`` to ``color``.
|
|
|
+
|
|
|
+\ **Example:**\
|
|
|
|
|
|
|
|
|
.. tabs::
|
|
@@ -1019,7 +1031,9 @@ This is the same as :ref:`set_pixelv<class_Image_method_set_pixelv>`, but with a
|
|
|
|
|
|
- void **set_pixelv** **(** :ref:`Vector2i<class_Vector2i>` point, :ref:`Color<class_Color>` color **)**
|
|
|
|
|
|
-Sets the :ref:`Color<class_Color>` of the pixel at ``point`` to ``color``. Example:
|
|
|
+Sets the :ref:`Color<class_Color>` of the pixel at ``point`` to ``color``.
|
|
|
+
|
|
|
+\ **Example:**\
|
|
|
|
|
|
|
|
|
.. tabs::
|