Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
aheckmann committed Sep 21, 2022
1 parent e47ca8e commit 9c7cac3
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,30 +24,30 @@ or clone the repo:

## Use ImageMagick instead of gm

Subclass `gm` to enable ImageMagick, optionally specifying the path to the executable.
Subclass `gm` to enable [ImageMagick 7+](https://imagemagick.org/script/porting.php)

```js
const fs = require('fs')
const gm = require('gm').subClass({
imageMagick: true,
appPath: String.raw`C:\Program Files\ImageMagick-7.1.0-Q16-HDRI\magick.exe`
});

// resize and remove EXIF profile data
gm('/path/to/my/img.jpg')
.resize(240, 240)
...
const gm = require('gm').subClass({ imageMagick: '7+' });
```

Subclass `gm` to enable ImageMagick 7+
Or, to enable ImageMagick legacy mode (for ImageMagick version < 7)

```js
var fs = require('fs')
, gm = require('gm').subClass({imageMagick: '7+'});

...
const fs = require('fs')
const gm = require('gm').subClass({ imageMagick: true });
```

## Specify the executable path

Optionally specify the path to the executable.

```js
const fs = require('fs')
const gm = require('gm').subClass({
appPath: String.raw`C:\Program Files\ImageMagick-7.1.0-Q16-HDRI\magick.exe`
});
```

## Basic Usage

Expand Down

0 comments on commit 9c7cac3

Please sign in to comment.