Skip to content
Load random images from the local filesystem to create a collage on a canvas element.
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist
.gitignore
config.json
index.js
package-lock.json
package.json
readme.md

readme.md

Collage App

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.

Requirements

  • 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.

Quick start

1. Get the latest version

Clone the files in this Git repository to a directory on your computer.

2. Switch to the app's directory

$ cd collage

3. Install the app's dependencies

$ npm install

4. Edit the configuration file

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.

5. Start the Node.js server and the application

$ node index.js

6. Open the application in your web browser

The app will be available at http://localhost:3000/.

You can’t perform that action at this time.