asset_convert
Convert textures between .png and .paa; detects alpha loss from DXT compression and advises renaming source to _ca to avoid irreversible reduction.
Instructions
Convert one texture between .png and .paa, and judge the result.
Which compression ImageToPAA writes is decided by the SOURCE FILE'S NAME,
and nothing says so at the time: a name ending in _co produces DXT1,
which keeps ONE BIT of alpha. A source measured 6 distinct alpha levels
going in and 2 coming out. So this measures the source's alpha before
converting, warns before the loss and again after it (C7), and says what to
do -- rename the source to end in _ca, because the output itself cannot
be repaired once the levels are gone.
source is absolute, or relative to the repository, or relative to
build.project_root. output defaults to the same name with the other
extension, beside the source; a relative output also lands beside it.
The verdict is read off the file that was written, never off the exit code.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| output | No | ||
| source | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| data | No | ||
| hint | No | ||
| error | No |