Skip to content

Instantly share code, notes, and snippets.

@shoorick shoorick/Makefile
Created Dec 19, 2018

Embed
What would you like to do?
Makefile for trimming PNG files and making them 2-bit black and white
SRC=.
DST=2b
FILES=*.png
trim $(DST)/$(FILES): $(SRC)/$(FILES)
for file in $(SRC)/$(FILES); do \
[ ! -f $(DST)/$$file -o $(SRC)/$$file -nt $(DST)/$$file ] \
&& echo $$file \
&& convert $(SRC)/$$file -dither none -colors 2 -trim +repage $(DST)/$$file; \
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.