img-workshop
This is a simple helper library to dynamically process images. It watches an input folder (or fileglob), applies some arbitrary processing to each image, and saves the result in an output folder. Whenever one of the source files changes, the processing is re-applied.
Installation
brew install graphicsmagicknpm install img-workshop
Usage
To invoke from code:
var watch = var gm = var input = './inputs/**/*.png' // file, folder, or globvar output = './outputs/' // foldervar { var img = // or whatever clip return img}
To use as an ad-hoc standalone library:
- Open
index.js
and edit theINPUT
andOUTPUT
settings - Open
processor.js
and fill in whatever image processing you want - run
npm start
from the project folder
Either way, image processing is done with gm, a node wrapper for graphicsmagick.
To see what can be done check the API docs.