commit 4adcbcd04e15d880a30cab12e37a91fc09c183f6 parent 5f561ec1b1a2dbe6dde3584f410481cbc998f340 Author: Anders Damsgaard <anders@adamsgaard.dk> Date: Mon, 31 Dec 2018 08:47:22 +0100 Add --resize-border option to upload script Diffstat:
M | links/bin/upload | | | 13 | ++++++++++++- |
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/links/bin/upload b/links/bin/upload @@ -8,7 +8,18 @@ if [ "$1" = "--border" ] || [ "$1" = "-b" ]; then uploadfile="$(mktemp)" #basename="border_$(basename "$2")" basename="$(basename "$2")" - convert "$2" -bordercolor White -border 10%x10% \ + convert "$2" \ + -bordercolor White -border 10%x10% \ + -unsharp 2x0.5+0.7+0 \ + -quality 95 \ + "$uploadfile" +elif [ "$1" = "--resize-border" ] || [ "$1" = "-rb" ]; then + uploadfile="$(mktemp)" + #basename="border_$(basename "$2")" + basename="$(basename "$2")" + convert "$2" \ + -resize 1000x1000\> \ # fit to 1000x1000 box, do not enlarge + -bordercolor White -border 10%x10% \ -unsharp 2x0.5+0.7+0 \ -quality 95 \ "$uploadfile"