| 1 | # Read KTX or DDS and decompose multiple images |
| 2 | |
| 3 | Read KTX or DDS and decompose into a number of simple images (PNG). |
| 4 | |
| 5 | - Reads file given as a command-line argument, |
| 6 | - outputs some information about it, |
| 7 | - and saves a sequence of PNG files `xxx-yyy.png` where `xxx` comes from the basename of $1, and `yyy` is the consecutive number from 0. |
| 8 | |
| 9 | The PNG files are saved in the same directory as input KTX / DDS. Use `--no-save` option to not save files (it then only outputs information). |
| 10 | |
| 11 | Try |
| 12 | |
| 13 | ``` |
| 14 | ./image_decompose data/marble_with_colored_mipmaps.dds |
| 15 | ``` |
| 16 | |
| 17 | Using [Castle Game Engine](https://castle-engine.io/). |
| 18 | |
| 19 | ## Building |
| 20 | |
| 21 | Compile by: |
| 22 | |
| 23 | - [CGE editor](https://castle-engine.io/editor). Just use menu items _"Compile"_ or _"Compile And Run"_. |
| 24 | |
| 25 | - Or use [CGE command-line build tool](https://castle-engine.io/build_tool). Run `castle-engine compile` in this directory. |
| 26 | |
| 27 | - Or use [Lazarus](https://www.lazarus-ide.org/). Open in Lazarus `x3d_call_pascal_code_standalone.lpi` file and compile / run from Lazarus. Make sure to first register [CGE Lazarus packages](https://castle-engine.io/lazarus). |