1.0.5 • Published 9 years ago

memecanvas v1.0.5

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

memecanvas

Node.js Meme Generator that uses Node-Canvas to render the final image.

To Install

    $ npm install memecanvas

Requirements

memecanvas utilizes Automattic's node-canvas module which has some pre-requisites that must be installed on your machine. To find out more please check out their Wiki and then come back here.

API

  • init(outputDirectoryName, fileAppendedName) The outputDirectoryName is where the meme file will be written to on your file system.fileAppendedName is a string that will be appended to the original file name. eg - if fileAppendedName = '-meme', photo.png will write out to photo-meme.png
  • generate(file, topText, bottomText, callback)file is the filename and location - eg. __dirname + 'public/images/photo.png'topText and bottomText are the text that will be overlayed on the top and bottom of the photo respectively. callback will return the filename or an error

Example Uses -

var memecanvas = require('memecanvas');
memecanvas.init('./tmp', '-meme');
memecanvas.generate('./photo.png', 'Top of Meme', 'Bottom of Meme', function(error, memefilename){
    if(error){
        console.log(error);
    } else {
        console.log(memefilename);
    }
});
1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago