Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including imagemosaick with all npm packages installed. Try it out:

var imagemosaick = require("imagemosaick")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

imagemosaick v1.0.3

Mosaic image generation utility using ImageMagick

imagemosaick

Image mosaic generation library using imagemagick

Build Status JavaScript Style Guide

Installation

npm install imagemosaick

Usage

var mosaick = require('imagemosaick')

let tilesFolder = './tileset'
let tileSize = 16
var tileset = new mosaick.Tileset(
    tilesFolder,
    tileSize)

let input = 'inputFile.png'
let output = 'outputFile.png'
let options = { }
mosaick.generate(input, output, tileset, options)
    .then(() => { console.log('Finished!') })

Options

Mosaic generation curently supports the following options:

OptionDescriptionDefault
verboseEnable verbose stdout loggingfalse
verboseExEnable extra verbose stdout logging (VERY verbose)false
maxMosaicSizeMaximum mosaic size in # of tiles (scale source image down to fit if necessary)200
thresholdHue match threshold (0-320) - how far should the color match go?60

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free