All Projects → Dellos7 → mosaic-node-generator

Dellos7 / mosaic-node-generator

Licence: MIT License
Generate mosaic images in Node.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to mosaic-node-generator

Github Activity Generator
A script that helps generate a rich GitHub Contribution Graph for your account
Stars: ✭ 259 (+936%)
Mutual labels:  generator, generate
Project Name
Get the name of a project from package.json, git config, or basename of the current working directory.
Stars: ✭ 8 (-68%)
Mutual labels:  generator, generate
Iconizer
Create Xcode asset catalogs swift and painless. Generate images for macOS and iOS app icons, launch images and image sets.
Stars: ✭ 751 (+2904%)
Mutual labels:  generator, generate
Numgen
Creates objects that generate number sequences
Stars: ✭ 5 (-80%)
Mutual labels:  generator, generate
Laravel Table
Generate tables from Eloquent models.
Stars: ✭ 101 (+304%)
Mutual labels:  generator, generate
python-makefun
Dynamically create python functions with a proper signature.
Stars: ✭ 62 (+148%)
Mutual labels:  generate, create
Laravel Bootstrap Table List
Bootstrap table list generator for Laravel.
Stars: ✭ 16 (-36%)
Mutual labels:  generator, generate
Docx
Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.
Stars: ✭ 2,150 (+8500%)
Mutual labels:  generate, create
Gopherkon
Go mascot image constructor. Create your cute own gopher.
Stars: ✭ 86 (+244%)
Mutual labels:  generator, picture
Prompt Checkbox
This repository has been archived, use Enquirer instead.
Stars: ✭ 21 (-16%)
Mutual labels:  generator, generate
Generate Gh Repo
Generate generator to create a new repository on GitHub.
Stars: ✭ 11 (-56%)
Mutual labels:  generator, generate
juxta
Generates large collages of images using OpenSeadragon
Stars: ✭ 41 (+64%)
Mutual labels:  collage, mosaic-images
Generate
A new command line tool and developer framework for scaffolding out GitHub projects. Generate offers the robustness and configurability of Yeoman, the expressiveness and simplicity of Slush, and more powerful flow control and composability than either.
Stars: ✭ 238 (+852%)
Mutual labels:  generator, generate
QuestPDF
QuestPDF is an open-source, modern and battle-tested library that can help you with generating PDF documents by offering friendly, discoverable and predictable C# fluent API.
Stars: ✭ 2,872 (+11388%)
Mutual labels:  generate, create
TyStrings
strings file tool for iOS / macOS developers
Stars: ✭ 15 (-40%)
Mutual labels:  generate
python-lorem
🐍 Python library for the generation of random text that looks like Latin
Stars: ✭ 19 (-24%)
Mutual labels:  generator
flutter-openpgp
OpenPGP for flutter made with golang for fast performance with support for android, ios, macos, linux, windows, web and hover
Stars: ✭ 35 (+40%)
Mutual labels:  generate
nuzlocke-generator
📃 A nuzlocke template generator.
Stars: ✭ 21 (-16%)
Mutual labels:  generator
BFSG
BFSG - BruteForce String Generator 😾
Stars: ✭ 16 (-36%)
Mutual labels:  generator
jekyll-slideshow
Compose your slides on Github, Host it on Github Pages for free.
Stars: ✭ 33 (+32%)
Mutual labels:  picture

Build Status npm version HitCount

mosaic-node-generator

A Node module to generate mosaic images.

Installation

You must have Node.js installed in your system.

Using npm:

npm install mosaic-node-generator --save

Example

Example: mosaic-node-generator-example

Code usage

Javascript

Easy example. Create a mosaic image from picture picture.jpg using the tiles from the folder pictures_folder.

var mosaic = require('mosaic-node-generator');
mosaic.mosaic( 
  'picture.jpg', 
  'pictures_folder' 
);
/**
 * Generates a mosaic image
 * @param inputImagePath The path of the input image that will be used to generate the mosaic
 * @param tilesDirectory The tiles directory we will use to read the images we will use in the mosaic generation
 * @param cellWidth The width (in pixels) of each cell in the mosaic
 * @param cellHeight The height (in pixels) of each cell in the mosaic
 * @param columns The number of columns (of tiles) of the mosaic
 * @param rows The number of rows (of tiles) of the mosaic
 * @param thumbsDirectoryFromRead We will use this folder in order to read the already generated thumbs from it
 * @param thumbsDirectoryToWrite We will use this folder in order to write the generated thumbs of the tiles
 * @param enableConsoleLogging Enable console logging
 */
function mosaic( 
  inputImagePath: string, 
  tilesDirectory?: string, 
  cellWidth?: number, 
  cellHeight?: number, 
  columns?: number, 
  rows?: number, 
  thumbsDirectoryFromRead?: string, thumbsDirectoryToWrite?: string, 
  enableConsoleLogging?: boolean
): void;

TypeScript

TODO

CLI usage

Install

Install npm package as global:

npm install mosaic-node-generator -g

Usage

mosaic-node-generator --help
Options:

-V, --version                                output the version number
    -i, --input-image [input_image]              The input image path
    -d, --tiles-directory [tiles_directory]      The tiles directory path
    -R, --thumbs-read [thumbs_read_directory]    The thumbnails read directory
    -W, --thumbs-write [thumbs_write_directory]  The thumbnails write directory
    -r, --rows [rows]                            The number of rows of the output image
    -c, --columns [columns]                      The number of columns of the output image
    -w, --cell-width [width]                     The cell width of each cell of the output image
    -h, --cell-height [height]                   The cell height of each cell of the output image
    -l, --disable-log [true/false]               Disable console logging
    -h, --help                                   output usage information

Usage example

Basic example. Create mosaic from input image and pictures folder. Write the generated thumbs from the pictures so next time we can just read the thumbs and not the pictures again:

mosaic-node-generator -i photo.jpg -d pictures_folder -W thumbs

Then we generate the mosaic again but this time reading from the thumbs generated from the last execution:

mosaic-node-generator -i photo.jpg  -R thumbs

We must take into account that if we have written the thumbnails using e.g cell_width and cell_height of 50x50 and then we generate again the mosaic reading from these thumbs, we should use a cell_width and cell_height of 50x50 again.

Test

Run Typescript tests:

npm run test:ts
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].