thumb-generator
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

Thumb Generator

Thumb Generator is a javascript library that use's HTML5 Canvas API to generate simple thumbnails.

Installation

$ npm install --save thumb-generator

Usage

import thumbGenerator from 'thumb-generator';
const base64 = thumbGenerator({
  width: 300,
  height: 300,
  text: 'T',
});

It will give you a base64 that renders an image just like the following.

Parameters

Property Description
width Width of the canvas, default: 200
height Height of the canvas, default: 200
color Color to fill the thumbnail, default is a random color.
text The text that will be inserted in the center of the thumbnail

Readme

Keywords

none

Package Sidebar

Install

npm i thumb-generator

Weekly Downloads

1

Version

2.0.0

License

MIT

Unpacked Size

26.8 kB

Total Files

16

Last publish

Collaborators

  • mduraes