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)} Copy
//@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)}
Retains more details than lower settings.
Balances quality and file size.
Prioritizes smaller file size over quality.
Optimizes for the smallest size, often sacrificing visual fidelity.
Provides the highest quality, with the largest file size.
Enum used to define the quality of image or texture compression. Higher quality typically results in larger file sizes. Used with Base64.
Example