I needed some tools that were able to do some slight lifting so I can do some modding. This is a simple DDS and PNG tool set that converts DDS images to PNG images and vice versa on a large scale. It has options for duplicate detection and sorting.
- Convert whole folders of textures between DDS, PNG, TGA and JPEG on a large scale
- Source format is auto-detected from the folder, or set explicitly with
--from - Folders may hold a mix of formats — every recognized file is converted in one pass
- Round-trip support:
--restoreconverts edited files back to each file's original format - Duplicate detection via a persisted result JSON file
- Optional retain structure mode to preserve original folder and file names
- Optional separate by size mode to sort textures into sub-folders by resolution
- Configurable compression effort for the written images
- Three convert modes:
Automatic,Manual, andGrouping - Interactive CLI with progress spinner powered by Spectre.Console
Image encoding and decoding is handled by DirectXTex, so DDS.Tools is a Windows-only tool.
DDS.Tools convert [ConvertMode] --to [options]
| Argument | Description |
|---|---|
<SourceFolder> |
Path to the folder containing the source images |
<TargetFolder> |
Path to the folder where converted images will be written |
[ConvertMode] |
Optional. Convert mode to use. Default is Automatic |
| Option | Description |
|---|---|
-f, --from |
Source image format (DDS, PNG, TGA, JPG). Omit to convert every recognized format in the folder |
-t, --to |
Target image format (DDS, PNG, TGA, JPG). Required unless --restore |
-r, --retain |
Retain original folder and file names |
-b, --bysize |
Separate converted textures into sub-folders by size |
-c, --compression |
Compression effort: None, Fast, Balanced, Maximum |
-x, --restore |
Restore files to the original format recorded in the source folder's Result.json |
| Mode | Description |
|---|---|
Automatic |
Default mode, options are ignored. Writes Result.json |
Manual |
Honors --retain / --bysize. With --retain also writes Result.json |
Grouping |
Groups output by a defined criteria |
DDS.Tools convert "D:\DDS-Textures" "D:\PNG-Textures" --to PNGDDS.Tools convert "D:\PNG-Textures" "D:\DDS-Textures" --from PNG --to DDSDDS.Tools convert "D:\DDS-Textures" "D:\PNG-Textures" Manual --to PNG --retain --bysizeDDS.Tools convert "D:\PNG-Textures" "D:\DDS-Textures" --from PNG --to DDS --compression MaximumDDS.Tools convert "D:\TGA-Textures" "D:\DDS-Textures" --to DDSConvert every file to PNG for editing, keeping names and folders, then restore each file to its original format:
# forward: mixed formats -> PNG, Result.json records each file's original format
DDS.Tools convert "D:\Game-Textures" "D:\Edit" Manual --to PNG --retain
# ...edit the PNG files in place...
# restore: PNG -> the original TGA / JPG formats and names
DDS.Tools convert "D:\Edit" "D:\Game-Textures-New" Manual --retain --restoreContributions are welcome! If you have an idea for a new feature, improvement, or bug fix, please follow these steps:
- Have a look at the Issues to see if your idea has already been discussed.
- If you want to work on an existing issue, please comment on the issue to let others know you're working on it.
- Fork the repository and create a new branch for your contribution.
- Make your changes and commit them with clear and descriptive messages.
- Push your changes to your forked repository and submit a pull request to the main repository.
We expect all contributors to adhere to the Code of Conduct.
This project is licensed under the MIT License - see the LICENSE file for details.
Robert Peter Meyer (BoBoBaSs84)
- GitHub: @BoBoBaSs84
- Repository: DDS.Tools