Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

README.md fix

  • Loading branch information...
commit 3669a57190ab74fbf06f322971dd57aea459d6a6 1 parent b9580ef
@dudochkin-victor dudochkin-victor authored
Showing with 10 additions and 9 deletions.
  1. +10 −9 README.md
View
19 README.md
@@ -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!
Please sign in to comment.
Something went wrong with that request. Please try again.