2.0.0 • Published 5 years ago

thumb-generator v2.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

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

PropertyDescription
widthWidth of the canvas, default: 200
heightHeight of the canvas, default: 200
colorColor to fill the thumbnail, default is a random color.
textThe text that will be inserted in the center of the thumbnail
2.0.0

5 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago