JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
inching towards opengl
[vor.git] / povtex.sh
diff --git a/povtex.sh b/povtex.sh
new file mode 100755 (executable)
index 0000000..e4f3bf4
--- /dev/null
+++ b/povtex.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+output="$1"
+tmpfile="$1.tmp.png"
+shift
+povray -D +A +UA -O- +FN $* 2>/dev/null > "$tmpfile" || sh -c "rm '$tmpfile'; false"
+pngcrush -rem gAMA -rem cHRM -rem iCCP -rem sRGB "$tmpfile" "$output" || sh -c "rm '$tmpfile'; false"
+rm "$tmpfile"