Update 'palette-gen.js'

This commit is contained in:
2023-06-17 02:42:25 +02:00
committed by soraefir
parent 1563bb0815
commit bd6cdd260f
24 changed files with 37 additions and 4 deletions

24
Makefile Normal file
View File

@@ -0,0 +1,24 @@
SRCDIR:= img
DSTDIR:= build
SOURCES := $(wildcard $(SRCDIR)/*)
FILES := $(patsubst $(SRCDIR)/%,$(DSTDIR)/%,$(SOURCES))
all: $(FILES)
@echo $(SOURCES)
@echo $(FILES)
palette.out: palette.in
node palette-gen.js < palette.in > palette.out
builddir:
@mkdir -p build
build/%.jpg: img/%.jpg builddir palette.out
repalette $@< $@ -p $$(cat palette.out) --dither $${DITHER}
build/%.png: img/%.png builddir palette.out
repalette $< $@ -p $$(cat palette.out) --dither $${DITHER}
clean:
@rm -rf palette.in palette.out build