node package manager
Easy collaboration. Discover, share, and reuse code in your team. Create a free org »

text-meme

text-meme Build Status

Generate text meme

Install

$ npm install --save text-meme

Usage

const textMeme = require('text-meme');
 
textMeme('unicorns ❤️').then(function (filename) {
    console.log(filename);
});
//=> 'generated text-meme > filename.gif' 
 
textMeme(input, {delay: 600, filename: 'quote.gif', background: '#4f656d'}).then(function (filename) {
    console.log(filename);
});
//=> 'generated text-meme > quote.gif' 

API

textMeme(input, [options])

input

Type: string

Don't forget to be awesome.

options

delay

Type: integer
Default: 500

Frame delay.

background

Type: string
Default: #000000

Image's background color in hex.

fontcolor

Type: string
Default: #ffffff

Font's color in hex.

filename

Type: string
Default: meme-randomInt

Expected name of the file (with file extension - .gif).

fontsize

Type: integer
Default: 50

Font's size.

imagesize

Type: integer Default: 600

Image's size in px (Height = Width = imagesize).

dest

Type: string Default: ''

Destination path where you want image to be generated.

Related

Note

This module uses canvas module as dependency which requires Cairo check here how to install it.

License

MIT © beatfreaker