]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - misc/tools/cached-converter.sh
cwebp requires png, so be it
[xonotic/xonotic.git] / misc / tools / cached-converter.sh
index 413e148d32e3e4cd849b9fe6a1eb946fd72b0301..09c042454d7350972298b19a12b4c39c384b27cd 100755 (executable)
@@ -251,8 +251,8 @@ reduce_jpeg2_webp()
        ia=$1; shift
        o=$1; shift; shift
        # this one MUST run
-       convert "$i" "$ia" -compose CopyOpacity -composite -type TrueColorMatte "$tmpdir/x.tga" && \
-       cwebp $1 "$tmpdir/x.tga" -o "$o"
+       convert "$i" "$ia" -compose CopyOpacity -composite -type TrueColorMatte "$tmpdir/x.png" && \
+       cwebp $1 "$tmpdir/x.png" -o "$o"
 }
 
 reduce_jpeg_jpeg()
@@ -341,7 +341,8 @@ reduce_rgba_webp()
 {
        i=$1; shift; shift
        o=$1; shift; shift
-       cwebp $1 "$i" -o "$o"
+       convert "$i" "$tmpdir/x.png" && \
+       cwebp $1 "$tmpdir/x.png" -o "$o"
 }
 
 has_alpha()