Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update README

  • Loading branch information...
commit 72cf1b13a25304eaf023fa22be731c09798e5b24 1 parent a180e30
@chriso chriso authored
Showing with 11 additions and 3 deletions.
  1. +11 −3 README.md
View
14 README.md
@@ -2,7 +2,7 @@
## 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
@@ -10,11 +10,19 @@ $ 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) {
- //..
+ //...
});
```
Please sign in to comment.
Something went wrong with that request. Please try again.