summaryrefslogtreecommitdiff
path: root/app/help/mkpngbutt
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2016-12-28 16:52:56 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2016-12-28 16:52:56 +0100
commit7b358424ebad9349421acd533c2fa1cbf6cf3e3e (patch)
tree686678532eefed525c242fd214d0cfb2914726c5 /app/help/mkpngbutt
Initial import of xtrkcad version 1:4.0.2-2
Diffstat (limited to 'app/help/mkpngbutt')
-rwxr-xr-xapp/help/mkpngbutt21
1 files changed, 21 insertions, 0 deletions
diff --git a/app/help/mkpngbutt b/app/help/mkpngbutt
new file mode 100755
index 0000000..0b77831
--- /dev/null
+++ b/app/help/mkpngbutt
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+
+NAME=$1
+shift
+FILES=""
+for F in $* ; do
+ FILES="${FILES} ../bin/$F.xpm"
+done
+#echo ${NAME}
+
+(./mkxpmbutt ${NAME} ${FILES} | convert +compress XPM:- PNG:temp.png) 2>&1
+#(./mkxpmbutt ${NAME} ${FILES} | convert +compress -transparency '#111' XPM:- PNG:temp.png) 2>&1
+#(./mkxpmbutt ${NAME} ${FILES} | xpmtoppm | pnmtopng -force > temp.png) 2>&1
+#(mkxpmbutt ${NAME} ${FILES} | convert -transparency '#111' XPM:- PNG:temp.png) 2>&1
+if cmp -s temp.png png.d/${NAME}.png ; then
+ rm temp.png
+else
+ echo updating ${NAME}.png
+ mv temp.png png.d/${NAME}.png
+fi