This script, ddstopng.py
, recursively searches for .dds
files in a folder and its subfolders that start with the word store
and converts them to .png
format. It skips conversion if the .png
version of a file already exists.
- Python 3.6 or later
- Pillow library for image processing
- Clone or download this repository to your local machine.
- Install the required dependencies using
pip
:pip install -r requirements.txt
-
Open a terminal or command prompt.
-
Run the script with the following command:
python ddstopng.py [folder_path]
- Replace
[folder_path]
with the path to the folder containing.dds
files. If no folder path is provided, the script defaults to:C:\Program Files (x86)\Steam\steamapps\common\Farming Simulator 25\data
- Replace
To use the default folder path, simply run:
python ddstopng.py
To specify a custom folder path:
python ddstopng.py "C:\Users\YourUser\Documents\Textures"
- The script will:
- Search for
.dds
files starting withstore
in the specified folder and subfolders. - Convert each
.dds
file to.png
format and save it in the same directory. - Skip conversion for
.dds
files if the.png
version already exists.
- Search for
The script provides detailed logs in the terminal:
Found X DDS files.
: Indicates how many.dds
files were located.Converted: [file_path] -> [png_path]
: Displays successful conversions.Skipping (png already exists): [png_path]
: Skips files if the.png
already exists.
- Ensure that the folder path provided has read/write permissions.
- The
.dds
files must be valid and supported by thePillow
library. - If an unsupported
.dds
file is encountered, the script will skip it and log an error.
If you encounter issues with missing dependencies, ensure you have installed them using:
pip install -r requirements.txt
If a .dds
file fails to convert, ensure it is compatible with the Pillow
library. Some .dds
formats may require additional plugins.
This project is open-source and available under the MIT License.