illustra

Illustra is an object-oriented, document based, Node.js image processing toolkit


Keywords
illustra, image, processing, generator, png, jpg, jpeg, nodejs, image-processing, image-generation
License
Apache-2.0
Install
npm install illustra@0.2.0

Documentation

Illustra

Illustra is currently in early development

Illustra is an object-oriented, document based Node.js image processing toolkit, complete with utility functions to make development a breeze. Illustra can be used for basic image operations like rotating and grayscaling, but Illustra's main purpose is for more complex images. A few examples could be generating avatars for users or banners for products.


Installation

Illustra is distributed via NPM. You can install it with the NPM CLI tool or with Yarn. Illustra has TypeScript support built in.

NPM:

npm install illustra

Yarn:

yarn add illustra

Once installed, you can import it into your project as usual:

// CommonJS
const illustra = require("illustra");

// or ES6 imports
import illustra from "illustra";

Or if you'd prefer, you can destruct the imports:

// CommonJS
const { Document, createLayer, createTextLayer, ... } = require("illustra");

// or ES6 imports
import { Document, createLayer, createTextLayer, ... } from "illustra";

Basic Usage

Illustra uses the concept of Documents for a canvas, and Layers for each element on the canvas:

// Create document
const banner = new Document({
    name: "Banner",
    width: 1500,
    height: 500
});

// Add background
await banner.createLayer({
    name: "background",
    file: `${__dirname}/assets/background.png`
});

// Add title
banner.createTextLayer({
    name: "title",
    text: {
        text: "Illustra",
        color: "#574ae2"
    }
});

// Export
await banner.exportTo("png", "file", `${__dirname}/images/banner.png`);

We recommend reading the Getting Started guide and the Documents and Layers guide to learn more about how to use Illustra. You can view all of the available guides here.


Issue Tracker

You can report bugs and suggest features by opening an issue. Please check to make sure that an issue for the bug or feature you're reporting doesn't already exist.


Contributing

Contributing guidelines will be available once Illustra is out of early development.