Page 1 of 1
How to convert many tga to dds?
Posted: 2019-04-18T07:29:14-07:00
by winmisha
How to convert many tga to dds?
The folder "Img", inside the files "tga"
Save with these settings.
https://yadi.sk/i/EzJAy9Itc8GROA
1
Code: Select all
C:\ImageMagick\convert.exe -format dds -define dds:mipmaps=0 -define dds:compression=a8r8g8b8 C:\Img\*.tga C:\Img\*.dds
2
Code: Select all
C:\ImageMagick\convert.exe -format dds -define dds:mipmaps=5 -define dds:compression=dxt1 C:\Img\*.tga C:\Img\*.dds
3
Code: Select all
C:\ImageMagick\convert.exe -format dds -define dds:mipmaps=0 -define dds:compression=dxt1 C:\Img\*.tga C:\Img\*.dds
Re: How to convert many tga to dds?
Posted: 2019-04-18T08:12:34-07:00
by snibgo
To process all the files in a folder, I suggest you either use "mogrify" instead of "convert", or use a "for" loop.
Re: How to convert many tga to dds?
Posted: 2019-04-18T08:46:37-07:00
by winmisha
snibgo wrote: ↑2019-04-18T08:12:34-07:00
To process all the files in a folder, I suggest you either use "mogrify" instead of "convert", or use a "for" loop.
Upd.
Did I specify the correct settings for dds?
https://yadi.sk/i/EzJAy9Itc8GROA
1
Code: Select all
C:\ImageMagick\mogrify.exe -format dds -define dds:mipmaps=0 -define dds:compression=a8r8g8b8 C:\Img\*.tga
2
Code: Select all
C:\ImageMagick\mogrify.exe -format dds -define dds:mipmaps=5 -define dds:compression=dxt1 C:\Img\*.tga
3
Code: Select all
C:\ImageMagick\mogrify.exe -format dds -define dds:mipmaps=0 -define dds:compression=dxt1 C:\Img\*.tga
Re: How to convert many tga to dds?
Posted: 2019-04-18T09:14:16-07:00
by winmisha
This does not work.
C:\ImageMagick\convert.exe -format dds -define dds:mipmaps=0 -define dds:compression=a8r8g8b8 C:\Img\*.tga
Use -define to specify the compression (e.g. -define dds:compression={dxt1, dxt5, none}). Other defines include dds:cluster-fit={true,false}, dds:weight-by-alpha={true,false}, dds:fast-mipmaps={true,false}, and use dds:mipmaps to set the number of mipmaps (use fromlist to use the image list).
Re: How to convert many tga to dds?
Posted: 2019-04-18T09:33:18-07:00
by snibgo
winmasha wrote:This does not work.
Because the command is wrong.
Your "-format dds" would be okay in mogrify, but in convert it sets the format for "info:". So remove that.
Your output file is "C:\Img\*.dds". But that won't do what you want. I suggest you use something like "C:\Img\myfile_%d.dds" which will makes files named myfile_0.dds, myfile_1.dds etc.
But, as I say: I suggest you either use "mogrify" instead of "convert", or use "convert" in a "for" loop.