]> git.netwichtig.de Git - user/henk/vcsh/zsh.git/commitdiff
Add pngpostproc function
authorHendrik Jaeger <git-commit@henk.geekmail.org>
Mon, 14 Aug 2017 20:46:35 +0000 (22:46 +0200)
committerHendrik Jaeger <git-commit@henk.geekmail.org>
Mon, 14 Aug 2017 20:46:35 +0000 (22:46 +0200)
.zsh_functions

index 18aa5e32cfb633ea3b4581d74b4763e0b5393e29..137c38151311bd5be55c5c1ec11c95e3612113e1 100644 (file)
@@ -54,3 +54,16 @@ function new_haskell_project () {
     cd $1
     git init
 }
+
+function henkspngpostproc () {
+    local resize_by
+    local img
+    resize_by="$1"
+    shift
+    for img in $*
+    do
+        mkdir -p resized/pngnqed
+        convert -resize $resize_by% $img resized/$img
+        pngnq -f -d resized/pngnqed -e .png resized/$img
+    done
+}