ImageTexture

    Category: Core

    A based on an Image.

    Properties

    Enumerations

    enum Storage:

    • STORAGE_RAW = 0 — data is stored raw and unaltered.
    • STORAGE_COMPRESS_LOSSY = 1Image data is compressed with a lossy algorithm. You can set the storage quality with .
    • STORAGE_COMPRESS_LOSSLESS = 2Image data is compressed with a lossless algorithm.

    Property Descriptions

    • lossy_quality

    The storage quality for STORAGE_COMPRESS_LOSSY.


    The storage type (raw, lossy, or compressed).

    • void create ( width, int height, format, int flags=7 )

    Create a new with width and height.


    • void create_from_image ( image, int flags=7 )

    Create a new ImageTexture from an with from Flags. An sRGB to linear color space conversion can take place, according to .


    Returns the format of the ImageTexture, one of .


    Load an ImageTexture from a file path.


    • void set_data ( Image image )

    Resizes the ImageTexture to the specified dimensions.