Skip to content

Instantly share code, notes, and snippets.

@g-l-i-t-c-h-o-r-s-e
Last active October 28, 2024 05:00
Show Gist options
  • Select an option

  • Save g-l-i-t-c-h-o-r-s-e/76ebdec893361de5abeccfc0b7e8dcf0 to your computer and use it in GitHub Desktop.

Select an option

Save g-l-i-t-c-h-o-r-s-e/76ebdec893361de5abeccfc0b7e8dcf0 to your computer and use it in GitHub Desktop.
Windows Batch Scripts To Aid in Editing DDS Textures
:: Batch Convert .dds Textures To .png
:: Pandela 2022
:: ============================================
for %%A IN (*.dds) DO convert "%%A" "%%~nA.png"
:: ============================================
:: Uncomment the stuff below if you want to resize textures, be sure to comment out the one above.
:: for %%A IN (*.dds) DO ffmpeg -i "%%A" -vf scale=iw*2:ih*2 "%%~nA.png"
:: Batch Convert .png Textures To .dds
:: Pandela 2022
:: =========================================================================
for %%A IN (*.png) DO convert "%%A" -define dds:compression=none "%%~nA.dds"
:: =========================================================================
@g-l-i-t-c-h-o-r-s-e
Copy link
Author

g-l-i-t-c-h-o-r-s-e commented Aug 25, 2022

Make sure you run the above .bat files in a folder containing your target .dds textures.
You will also need one or both of the binaries below, for imagmagick make sure you installed the legacy convert tool it comes with.

https://imagemagick.org/script/download.php#windows
https://imagemagick.org/archive/binaries/ImageMagick-7.1.0-46-Q16-HDRI-x64-dll.exe

https://ffbinaries.com/downloads
https://github.com/ffbinaries/ffbinaries-prebuilt/releases/download/v4.4.1/ffmpeg-4.4.1-win-64.zip

@g-l-i-t-c-h-o-r-s-e
Copy link
Author

g-l-i-t-c-h-o-r-s-e commented Aug 25, 2022

The commented out FFMpeg command also multiplies the input image scale by 2x

@g-l-i-t-c-h-o-r-s-e
Copy link
Author

https://bigjpg.com/ - AI Assisted Image Upscale
https://www.remove.bg/ - AI Assisted Image Background Removal

@Accoast
Copy link

Accoast commented Oct 28, 2024

Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment