Skip to content

Latest commit

 

History

History
35 lines (23 loc) · 1.53 KB

README.md

File metadata and controls

35 lines (23 loc) · 1.53 KB

Image Patternizer

Randomly generate and apply patterns to an image

This node script uses css-doodle and html-to-image to apply a randomly generated pattern to an image.

Requirements

  • Node >= 12.16.2

Installation

npm install

Usage

node generateImages.js <number_of_images_to_generate> <path_to_image>

Example:

node generateImages.js 5 ./examples/ghost.png

This script will generate an output folder with the generated patterns and the final resulting images

input pattern final

How to extend:

If you want to add even more randomness to the generator, you can. Simply:

  • Create your new function in ./app/generatorFunctions.js
  • Make sure your function returns a string with a valid css-doodle syntax
  • Export your function in the end of the file
  • Import it in the main generateImages.js file like this: const {lines, boxes, characters, radial, myNewFunction} = generatorFuncs
  • Add it to the function randomization function getDoodleContainer() inside generateImages.js