// DIE's signature file
// Author: LinXP

init("image","");

function detect(bShowType,bShowVersion,bShowOptions)
{
    if(Binary.getSize()>=0x40)
    {
        if(Binary.compare("'«KTX 11»'0D0A1A0A"))
        {
            bDetected=true;
            sName="Khronos Texture (.KTX)";
            if(Binary.isVerbose())
            {
                sOption(Binary.read_uint32(0x24)+"x"+Binary.read_uint32(0x28));
            }
        }

        else if(Binary.compare("'«KTX 20»'0D0A1A0A"))
        {
            bDetected=true;
            sName="Khronos Texture (.KTX2)";
            if(Binary.isVerbose())
            {
                sOption(Binary.read_uint32(0x14)+"x"+Binary.read_uint32(0x18));
            }
        }

        // https://github.com/BinomialLLC/basis_universal/wiki/.basis-File-Format-and-ETC1S-Texture-Video-Specification
        else if(Binary.compare("734213004D00"))
        {
            bDetected=true;
            sName="Basis Universal GPU Texture (.BASIS)";
            if(Binary.isVerbose())
            {
                //sOption(Binary.read_uint32(0x14)+"x"+Binary.read_uint32(0x18));
            }
        }



    }

    return result(bShowType,bShowVersion,bShowOptions);
}