Skip to content

DXT1UseAlpha 0 has no effect #343

@B-Interactive

Description

@B-Interactive

All attempts so far to produce a DXT1 with no alpha (0x83f0), have only resulted in a DXT1A with 1-bit alpha (0x83f1). The result is the same even when the source .png has had all alpha data stripped completely from it.

It's not clear what the DXT1UseAlpha option does.

$ magick atlas.png -background white -alpha remove -alpha off PNG24:atlas_rgb.png

$ compressonatorcli -fd DXT1 -DXT1UseAlpha 0 atlas_rgb.png atlas_dxt1.ktx
/usr/lib/compressonator-cli-bin/compressonatorcli
Processing source     : atlas_rgb.png
Processing destination: atlas_dxt1.ktx
Source data size      = 16777216 Bytes, width = 2048 px  height = 2048 px
Destination data size = 2097152 Bytes   Resulting compression ratio = 8.00:1

Done Processing
$ ktxinfo atlas_dxt1.ktx Header

identifier: «KTX 11»\r\n\x1A\n
endianness: 0x4030201
glType: 0
glTypeSize: 1
glFormat: 0
glInternalformat: 0x83f1
glBaseInternalformat: 0x1908
pixelWidth: 2048
pixelHeight: 2048
pixelDepth: 0
numberOfArrayElements: 0
numberOfFaces: 1
numberOfMipLevels: 1
bytesOfKeyValueData: 0

No Key/Value data.

Data Sizes (bytes)
------------------
Level 0: 2097152

Total: 2097152

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions