This application generates photo collages. A collage in this app is a composition of three randomly chosen images.
It is a Node.js web application that loads images from directories on the local file system and shows the generated collage on a canvas element in the browser.
- Mac OS X, Windows, or Linux
- A web browser
- Node.js I have 8.0.0 installed, but older versions might work just as well.
Clone the files in this Git repository to a directory on your computer.
$ cd collage
$ npm install
Open config.json
in a plain text editor
{
"width": 1600,
"height": 900,
"imageDirectories": [
"../../path/to/an/image/directory/",
"../../path/to/another/image/directory/"
]
}
"width" and "height" determine the size of the generated collage in pixels. "imageDirectories" is a comma separated list of directories that contain the images you want to use for the collages. Image paths can be relative, as shown in the example.
$ node index.js
The app will be available at http://localhost:3000/.