Update 'palette-gen.js'

This commit is contained in:
2023-06-17 02:42:25 +02:00
committed by soraefir
parent 1563bb0815
commit a1676fc2a0
25 changed files with 49 additions and 16 deletions

23
Makefile Normal file
View File

@@ -0,0 +1,23 @@
SRCDIR:= img
DSTDIR:= build
SOURCES := $(shell find ${SRCDIR} -type f -print)
FILES := $(patsubst $(SRCDIR)/%,$(DSTDIR)/%,$(SOURCES))
all: $(FILES)
palette.out: palette.in
node palette-gen.js
builddir:
@mkdir -p build
@mkdir -p build/gif
build/%: img/% builddir palette.out
repalette $< $@ -p $$(cat palette.out) --dither $(DITHER)
build/%.gif: img/%.gif builddir palette.out
gifsicle --use-colormap gifpalette.out < $< > $@
clean:
@rm -rf palette.in palette.out build