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

TypeNameDescription
boolresulttrue if the image is GPU block-compressed, false otherwise

Examples

Check compression state before compressing
local entity = core.image.create("assets/diffuse.png")

if not entity:is_compressed() then
    entity:compress(core.image.compression_mode.S3TC)
end
Guard a convert call against compressed images
local entity = core.image.create("assets/sprite.png")

if not entity:is_compressed() then
    entity:convert(core.image.texel_format.RGBA8)
end

On this page