Permalink
Browse files

README.md fix

  • Loading branch information...
1 parent b9580ef commit 3669a57190ab74fbf06f322971dd57aea459d6a6 @dudochkin-victor dudochkin-victor committed Mar 21, 2012
Showing with 10 additions and 9 deletions.
  1. +10 −9 README.md
View
@@ -17,16 +17,17 @@ npm install gd
## Using GD
-var fs = require('fs');
-var path = require('path');
-var gd = require('gd');
+app.js:
+ var fs = require('fs');
+ var path = require('path');
+ var gd = require('gd');
+
+ var source = './test.png';
+ var target = './test.thumb.png';
-var source = './test.png';
-var target = './test.thumb.png';
+ if (path.exists(target)) fs.unlink(target);
-if (path.exists(target)) fs.unlink(target);
-
-gd.openPng(
+ gd.openPng(
source,
function(png, path) {
if(png) {
@@ -37,6 +38,6 @@ gd.openPng(
target_png.savePng(target, 1, gd.noop);
}
}
-);
+ );
That's all folks!

0 comments on commit 3669a57

Please sign in to comment.