self:is_compressed
Client
Checks whether the image has been GPU block-compressed
Syntax
local result = self:is_compressed()Parameters
| No parameters are accepted by this function |
|---|
Returns
| Type | Name | Description |
|---|---|---|
bool | result | true if the image is GPU block-compressed, false otherwise |
Examples
local entity = core.image.create("assets/diffuse.png")
if not entity:is_compressed() then
entity:compress(core.image.compression_mode.S3TC)
endlocal entity = core.image.create("assets/sprite.png")
if not entity:is_compressed() then
entity:convert(core.image.texel_format.RGBA8)
end