png2dds script

  • Thread starter Thread starter sithlord48
  • Start date Start date
Status
Not open for further replies.
S

sithlord48

Guest
Hey all. I wrote this little script for users on linux or mac os who want to convert png2dds files.

1. Install imagemagick from your package manager
2. Save this a png2dds.sh
Code: [Select]
Code:
for D in `find . -type d`do    for file in "$D"/*.png    do        if [ "$file" != "./*.png" ]; then            convert $file "$(echo $D | cut -c3-)/$(basename "$file" .png).dds"        fi    donedone
run with png2dds.sh it will convert every png file from this folder recursively into a dds file with the same name in the same path as the png file.

To remove png files after the script is done
Code: [Select]
Code:
find . -name *.png -delete
 
Warning
DDs is a contairer with can use several compression méthods.
ATM imagemagick can't use dc7, it's use dxt5 max so you'll realy loose in quality comparing to dc7.
 
Status
Not open for further replies.
Back
Top