Preparing search index...

    Enumeration CompressionQuality

    Enum used to define the quality of image or texture compression. Higher quality typically results in larger file sizes. Used with Base64.

    Lens Scripting Version 285

    //@input Asset.Texture texture

    //@input int compressionQuality = 0 {"widget" : "combobox", "values" : [{"label" : "MaximumCompression", "value" : "0"}, {"label" : "LowQuality", "value" : "1"}, {"label" : "IntermediateQuality", "value" : "2"}, {"label" : "HighQuality", "value" : "3"}, {"label" : "MaximumQuality", "value" : "4"}]}

    //@input int encodingType = 0 {"widget" : "combobox", "values" : [{"label" : "Png", "value" : "0"}, {"label" : "Jpg", "value" : "1"}]}

    Base64.encodeTextureAsync(script.texture, onSuccess, onFailure, script.compressionQuality, script.encodingType)

    function onSuccess(encodedTexture) {
    print("Encoded texture: " + encodedTexture)
    }

    function onFailure(error) {
    print("Error: " + error)
    }
    Index

    Enumeration Members

    HighQuality: number

    Retains more details than lower settings.

    Lens Scripting Version 285

    IntermediateQuality: number

    Balances quality and file size.

    Lens Scripting Version 285

    LowQuality: number

    Prioritizes smaller file size over quality.

    Lens Scripting Version 285

    MaximumCompression: number

    Optimizes for the smallest size, often sacrificing visual fidelity.

    Lens Scripting Version 285

    MaximumQuality: number

    Provides the highest quality, with the largest file size.

    Lens Scripting Version 285