:github_url: hide .. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the ImageTexture.xml source instead. .. The source is found in doc/classes or modules//doc_classes. .. _class_ImageTexture: ImageTexture ============ **Inherits:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` A :ref:`Texture2D` based on an :ref:`Image`. Description ----------- A :ref:`Texture2D` based on an :ref:`Image`. Can be created from an :ref:`Image` with :ref:`create_from_image`. Methods ------- +----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`create_from_image` **(** :ref:`Image` image **)** | +----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Format` | :ref:`get_format` **(** **)** const | +----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_size_override` **(** :ref:`Vector2` size **)** | +----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`update` **(** :ref:`Image` image, :ref:`bool` immediate=false **)** | +----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ Method Descriptions ------------------- .. _class_ImageTexture_method_create_from_image: - void **create_from_image** **(** :ref:`Image` image **)** Create a new ``ImageTexture`` from an :ref:`Image`. ---- .. _class_ImageTexture_method_get_format: - :ref:`Format` **get_format** **(** **)** const Returns the format of the ``ImageTexture``, one of :ref:`Format`. ---- .. _class_ImageTexture_method_set_size_override: - void **set_size_override** **(** :ref:`Vector2` size **)** Resizes the ``ImageTexture`` to the specified dimensions. ---- .. _class_ImageTexture_method_update: - void **update** **(** :ref:`Image` image, :ref:`bool` immediate=false **)** Replaces the texture's data with a new ``image``. If ``immediate`` is ``true``, it will take effect immediately after the call.