Created
December 19, 2018 20:46
-
-
Save shoorick/93e8bedef0c60cb447bb4d611f63cd38 to your computer and use it in GitHub Desktop.
Makefile for trimming PNG files and making them 2-bit black and white
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
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