Convert DDS to PNG using linux command line

11

2

I need to convert thousands of DDS images to PNG format in Linux, preferably in command line.

Is there any program available for such task?

Stolz

Posted 2010-07-02T12:18:03.943

Reputation: 222

Answers

17

ImageMagick reads but doesn't write DDS. And of course it reads and writes PNG.

From identify -list format:

...
DDS* DDS r-- Microsoft DirectDraw Surface
...
PNG* PNG rw- Portable Network Graphics (libpng 1.2.37)
...

To convert a file (leaving the original intact):

convert test.dds test.png

To convert a directory full:

for file in *.dds
do
    convert "$file" "$(basename "$file" .dds).png"
done

Paused until further notice.

Posted 2010-07-02T12:18:03.943

Reputation: 86 075

2Latest version of ImageMagick (6.8.7-4) writes DDS files as well – Paolo Gibellini – 2013-11-05T23:13:14.893