Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
GD graphic library (libgd) C++ bindings for Node.js.
C++ CoffeeScript Python Shell
tag: v0.1.8

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README.md
node-gd.cc
node-gd.js
package.json
test.js
wscript

README.md

GD bindings for Node.js

GD graphic library bindings for Node.js supporting asynchronous I/O.

Original source https://github.com/taggon/node-gd

Tested with Node v0.4

Install

npm install node-gd

Dependencies

  • libgd - in debian install with

    apt-get install libgd2-xpm-dev
    

Usage

Require library

var gd = require("node-gd");

Open file

gd.openPng("test.png", function(png, path){
    console.log("Width: ", png.width);
    console.log("Height: ", png.width);
});

Save file

png.savePng("out.png", 0, function(){
    console.log("image saved!");
});

Create empty file

var img = gd.create(width, height);

Copy image

source.copyResampled(dest,dstX,dstY,srcX,srcY,dstW,dstH,srcW,srcH);
Something went wrong with that request. Please try again.