From bd38bc6755f4dc5db63739a5c7a01c8873eb94d7 Mon Sep 17 00:00:00 2001 From: Matt Hughes Date: Fri, 17 Mar 2017 22:20:35 -0400 Subject: [PATCH] Script for transparent-ifying background of an emoji currently overwrites the emoji in question --- transparent.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 transparent.sh diff --git a/transparent.sh b/transparent.sh new file mode 100755 index 0000000..6004a79 --- /dev/null +++ b/transparent.sh @@ -0,0 +1,10 @@ +#!/bin/zsh + +input_file_name_raw=${1?"gotta' gimme'a file name, yo"}; +# "path/to/file.blah" -> "file.blah" +input_file_name="$(basename "${input_file_name_raw}")" +# "file.blah" -> "file-transparent.png" +file_name_to_output="${input_file_name%.*}.png" + + +convert ${input_file_name} -fuzz 05% -transparent white ${file_name_to_output}