georges/pictures/Makefile

22 lines
446 B
Makefile
Raw Normal View History

FULLPICS = $(wildcard full/*.jpg)
THUMBS = $(patsubst full/%.jpg,thumb/%.jpg,$(FULLPICS))
THUMB_DIM = 400
THUMB_ASPECT_RATIO = 1:1
CONVERT_OPTIONS = -quality 75 -strip -interlace Plane +repage
all: $(THUMBS)
2022-02-03 13:17:25 +01:00
thumb:
mkdir -p thumb
thumb/%.jpg: full/%.jpg thumb
convert "$<" \
-resize '$(THUMB_DIM)x$(THUMB_DIM)^' \
-gravity "$$(./gravityof.sh "$<")" \
-crop "$(THUMB_ASPECT_RATIO)" \
$(CONVERT_OPTIONS) "$@"
clean:
rm -f $(THUMBS)