-
Notifications
You must be signed in to change notification settings - Fork 617
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #846 from aheckmann/windows
Windows
- Loading branch information
Showing
123 changed files
with
1,011 additions
and
859 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,29 @@ | ||
|
||
var assert = require('assert') | ||
var fs = require('fs'); | ||
var path = require('path'); | ||
const assert = require('assert') | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
module.exports = function (_, dir, finish, gm) { | ||
module.exports = function (_, dir, finish, gm, imageMagick) { | ||
if (!gm.integration) | ||
return finish(); | ||
|
||
gm(dir + '/original.jpg') | ||
.thumb(150, 40, dir + '/thumb.png', function thumb (err) { | ||
gm(dir + '/thumb.png') | ||
.size(function (err, size) { | ||
if (err) return finish(err); | ||
const originalPathName = path.join(dir, 'original.jpg'); | ||
const thumbPathName = path.join(dir, 'thumb.png'); | ||
|
||
assert.equal(142, size.width); | ||
assert.equal(40, size.height); | ||
gm(originalPathName).options({ imageMagick }).thumb(150, 40, thumbPathName, function thumb (err) { | ||
gm(thumbPathName).options({ imageMagick }).size(function (err, size) { | ||
if (err) return finish(err); | ||
|
||
gm(dir + '/original.jpg') | ||
.thumbExact(150, 40, dir + '/thumb.png', function thumb (err) { | ||
gm(dir + '/thumb.png') | ||
.size(function (err, size) { | ||
assert.equal(150, size.width); | ||
assert.equal(40, size.height); | ||
finish(err); | ||
}); | ||
assert.equal(142, size.width); | ||
assert.equal(40, size.height); | ||
|
||
gm(originalPathName).options({ imageMagick }).thumbExact(150, 40, thumbPathName, function thumb (err) { | ||
gm(thumbPathName).options({ imageMagick }).size(function (err, size) { | ||
assert.equal(150, size.width); | ||
assert.equal(40, size.height); | ||
finish(err); | ||
}); | ||
}); | ||
}); | ||
}); | ||
} |
Oops, something went wrong.