Created
November 4, 2016 15:08
-
-
Save anonymous/1853b5d13093d3c27a0b93db42045055 to your computer and use it in GitHub Desktop.
Blocky potrace
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
argv=("$0" "$@") # $# == ${#argv[@]} + 1 | |
last=${argv[$#]} | |
newwidth=$(( $(identify -format "%w" -- "$last") * 10)) | |
newheight=$(( $(identify -format "%h" -- "$last") * 10)) | |
# select every arg but last and argv[0] | |
mkbitmap -n -s 1 -o - -- "$last" | # -n turns off filtering | |
convert -scale "${newwidth}x${newheight}" -- - - | # convert does a blocky scale | |
/usr/bin/potrace "${argv[@]:1:$#-1}" -r 10 -a 0 -- - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
modified (or idea) from https://gist.github.com/bendmorris/7170209
save this as
/usr/local/bin/potrace
to cheat fontforge*
$# == ${#argv[@]} - 1