Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A plugin for gm node module, which enables simple buffering of image binary for later content-length detection.
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
index.js
package.json
readme.md

readme.md

A plugin for gm node module, which enables simple buffering of image binary for later content-length detection.

Installation

npm i gm
npm i gm-buffer

Usage

var gm = require('gm');

require('gm-buffer');

gm('/me.jpg')
    .resize(canvas.width, canvas.height, '^')
    .gravity('Center')
    .buffer(function(err, buf) {
        console.log(buf.length);
    });
Something went wrong with that request. Please try again.