Permalink
Browse files

Update README

  • Loading branch information...
1 parent a180e30 commit 72cf1b13a25304eaf023fa22be731c09798e5b24 @chriso chriso committed Oct 3, 2012
Showing with 11 additions and 3 deletions.
  1. +11 −3 README.md
View
@@ -2,19 +2,27 @@
## Installation
-Requires that [jpegmini](http://www.jpegmini.com) and [exiftool](http://owl.phy.queensu.ca/~phil/exiftool/) are available in `PATH`
+[jpegmini](http://www.jpegmini.com) and [exiftool](http://owl.phy.queensu.ca/~phil/exiftool/) must be installed and available in `PATH`
```bash
$ npm install jpegmini
```
## Usage
-Compress an image
+High-level API
```javascript
var jpegmini = require('jpegmini');
+jpegmini.optimise('/path/to/image.jpg', function (err) {
+ //...
+});
+```
+
+Low-level API
+
+```javascript
jpegmini.process({
input: '/path/to/input.jpg'
, output: '/path/to/output.jpg'
@@ -23,7 +31,7 @@ jpegmini.process({
, remove_metadata: false
, license_cache: '/var/tmp/jpegmini_cache'
}, function (err) {
- //..
+ //...
});
```

0 comments on commit 72cf1b1

Please sign in to comment.