Skip to content

aqueiros/image-patternizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Randomises and applies a pattern to your images

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published