How can I TGA file format to DDS format?

404 views Asked by At

I have a question. Could you help me, please?

import os
import sys

def prozess_start(programmName, parameter):

    return os.execv(programName, parameter)


def read_files(pfad):

    TGA_files = []

    name_file = os.listdir(pfad)

    t = []

    for i in name_file:

        if i.endswith(".TGA"):

            TGA_files.append(i)

    return TGA_files

input_path = "..."

outut_path = "..."

parameter = ["input_file", "output_file", "1", "2", ..]

l = read_files(pfad)

for i in l:

    parameter[0] = input_path + i

    parameter[1] = outut_path + i[:-4] + ".DDS"

    prozess_start("...exe", parameter)

The Code doesn't work.

I have files with ending .TGA and I would like to format it to .DDS.

Maybe You see mistakes?

Thank you very much!

0

There are 0 answers