Created
October 19, 2019 19:19
-
-
Save spewil/6e32adb60f7a1dd188b1cbd0e25a2008 to your computer and use it in GitHub Desktop.
convert images to vectors
This file contains hidden or 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
# png/jpg --(mogrify/magick)--> ppm --(mkbitmap)--> pbm --(potrace)--> svg | |
# mkbitmap parameters: | |
# -f n == Apply a highpass filter to the image.The parameter n is a radius (in pixels) which corresponds approximately to the size of details which should be preserved. | |
# -s n == Scale the image by an integer factor n>0. | |
# -3 == Use cubic interpolation when scaling to a higher resolution. | |
# -t n == Set the threshold grey value for bilevel conversion. | |
'''shell | |
mogrify -format ppm *.jpg | |
mkbitmap -f 5 -s 2 -3 -t 0.45 *.ppm | |
potrace -b svg *.pbm | |
''' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment