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()
{
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()