Skip to content

Commit

Permalink
resize
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Dec 18, 2011
1 parent 08c1a48 commit ca2f984
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions test
@@ -1,10 +1,23 @@
#!/usr/bin/env node

var palette = require('./')
, canvas = require('canvas')
, path = process.argv[2];
, Canvas = require('canvas')
, Image = Canvas.Image
, canvas = new Canvas
, ctx = canvas.getContext('2d')
, path = process.argv[2]
, out = '/tmp/out.png';

if (!path) {
console.error('Usage: test <image>');
process.exit(1);
}
}

var img = new Image;

img.onload = function(){
canvas.width = img.width;
canvas.height = img.height;
};

img.src = path;

0 comments on commit ca2f984

Please sign in to comment.