Skip to content

Instantly share code, notes, and snippets.

@dwo
Created May 9, 2015 15:47
Show Gist options
  • Save dwo/166bb15abc4fd9b4df92 to your computer and use it in GitHub Desktop.
Save dwo/166bb15abc4fd9b4df92 to your computer and use it in GitHub Desktop.
Resizing images from one folder to another with ImageMagick and GNU Make
source_files := $(wildcard src/*.jpg)
resized_files := $(source_files:src/%.jpg=resized/%.jpg)
all: $(resized_files)
resized/%.jpg: src/%.jpg
convert $< -resize 1920x1080 $@
@dwo
Copy link
Author

dwo commented May 9, 2015

Run with make -j2 to resize 2 at a time, make -j4 to resize 4 at a time etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment