Enumeration CompressionQuality

Enum used to define the quality of image or texture compression. Higher quality typically results in larger file sizes. 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

HighQuality: number

Retains more details than lower settings.

IntermediateQuality: number

Balances quality and file size.

LowQuality: number

Prioritizes smaller file size over quality.

MaximumCompression: number

Optimizes for the smallest size, often sacrificing visual fidelity.

MaximumQuality: number

Provides the highest quality, with the largest file size.

MMNEPVFCICPMFPCPTTAAATR