Skip to content

[WIP] Easily generate images on-the-fly with node.js using wide range of templates

License

Notifications You must be signed in to change notification settings

gfggithubleet/canvacord

 
 

Repository files navigation

SWUbanner

Canvacord

Easily generate images on-the-fly with node.js using wide range of templates.

Warning

You are looking at the next version of canvacord, which is under development. Go to the legacy branch to view legacy codebase.

Features

  • image generation (wip)
  • image manipulation (wip)
  • image templates (wip)
  • image filters (wip)
  • complex layouts (wip)

Example

Image Generation

import { canvacord } from 'canvacord';
import fs from 'node:fs';

// triggered gif
const triggered = await canvacord.triggered(image);
triggered.pipe(fs.createWriteStream('triggered.gif'));

// filters
const filtered = await canvacord
    .filters(512, 512)
    .drawImage(image)
    .hueRotate(90)
    .invert(2)
    .sepia(1)
    .opacity(0.5)
    .saturate(2)
    .encode();

// alternative syntax
const filtered = await canvacord(image, 512, 512)
    .hueRotate(90)
    .invert(2)
    .sepia(1)
    .opacity(0.5)
    .saturate(2)
    .encode();

fs.writeFileSync('filtered.png', filtered);

XP Card Preview

xp-card

About

[WIP] Easily generate images on-the-fly with node.js using wide range of templates

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 100.0%