This is a multithreaded node js script that allows you to create generative png or gif from your source png files.
-
Install dependencies
$ yarn install
-
Setup the following directory structure in your root
- assets/
- gifs/ (Place here your original PNGs to combine into gifs)
- pngs/ (Place here ypur source pngs by categories to create generative images)
- Make sure your original PNGs and directory routes have consistent names
Run $ yarn createImages [param1] [param2]
param1: Type of generative image. pngs
or gifs
param2: number of pngs/gifs. Since it runs in parallel the output can be slighly higher.
- Setup export folders
- assets/
- exports/
- gifs/
- pngs/
- temp/
- Adapt the
pngs.js
orgifs.js
file in the constants directory. DefineDISTRIBUTION
,PNG_START_PATHS
according to your distributions an unique source pngs file names.