Created
October 13, 2017 09:02
-
-
Save bivihoba/d769a724f456586445160c6a7088e762 to your computer and use it in GitHub Desktop.
Potrace Sandbox Dockerfile
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
FROM alpine:3.6 | |
RUN apk add --no-cache --update gcc make automake autoconf libtool musl-dev zlib-dev git openssl nodejs nodejs-npm imagemagick | |
RUN git clone https://github.com/skyrpex/potrace.git && \ | |
cd potrace && \ | |
autoreconf -i && \ | |
./configure && make && make install | |
RUN npm install -g svgo | |
RUN mkdir /sandbox | |
WORKDIR /sandbox | |
# Usage | |
# docker build -t bivihoba/potrace . | |
# docker run --rm -it --name potrace -v $(pwd):/sandbox bivihoba/potrace /bin/sh | |
# convert original.jpg temp.svg | |
# potrace -s temp.ppm -o temp.svg --color=#cccccc --flat -u 1 --longcoding --turdsize=100 --opttolerance 0.4 --turnpolicy majority | |
# svgo temp.svg original.svg | |
# Credits | |
# https://twitter.com/Martin_Adams/status/918481948217049088 | |
# https://twitter.com/mikaelainalem/status/918213244954861569 | |
# See Also | |
# https://gist.github.com/bivihoba/7e615e8c0b4485ff284778977240fbb9 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment