Specifies the format for encoding textures, used with Base64.

//@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)
}

Enumeration Members

Enumeration Members

Jpg: number

Lossy compression, usually smaller in size.

Png: number

Lossless compression.

MMNEPVFCICPMFPCPTTAAATR