|
@@ -303,10 +303,15 @@ class CompressIMG extends Convert {
|
|
try sys.FileSystem.deleteFile(dstPath) catch( e : Dynamic ) {};
|
|
try sys.FileSystem.deleteFile(dstPath) catch( e : Dynamic ) {};
|
|
sys.io.File.copy(srcPath, tmpFile);
|
|
sys.io.File.copy(srcPath, tmpFile);
|
|
|
|
|
|
- // convert srgb textures to normal space
|
|
|
|
- var srgbParam = hasParam("srgb") && getParam("srgb") ? "-srgb" : "";
|
|
|
|
|
|
+ var args = [
|
|
|
|
+ "-f",
|
|
|
|
+ tcFmt,
|
|
|
|
+ "-y",
|
|
|
|
+ "-nologo",
|
|
|
|
+ "-srgb", // Convert srgb to linear color space if target format doesn't support srgb (i.e from convertig from PNG to dds RGBA)
|
|
|
|
+ tmpFile
|
|
|
|
+ ];
|
|
|
|
|
|
- var args = ["-f", tcFmt, "-y", "-nologo", srgbParam, tmpFile];
|
|
|
|
if( !mips ) args = ["-m", "1"].concat(args);
|
|
if( !mips ) args = ["-m", "1"].concat(args);
|
|
command("texconv", args);
|
|
command("texconv", args);
|
|
sys.FileSystem.deleteFile(tmpFile);
|
|
sys.FileSystem.deleteFile(tmpFile);
|