Skip to content

Commit 6483154

Browse files
committed
Merge branch 'beta'
2 parents 22eec8b + 7ff8242 commit 6483154

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,10 @@ applySmartCrop(src, 'flower-square.jpg', 128, 128);
5151

5252
## Face Detection Example
5353
Check out [smartcrop-cli](https://github.com/jwagner/smartcrop-cli/) for a more advanced [example](https://github.com/jwagner/smartcrop-cli/blob/master/smartcrop-cli.js#L100) of how to use smartcrop from node including face detection with opencv.
54+
55+
56+
## Changelog
57+
58+
### 2.0 (beta)
59+
60+
It's faster.

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ var iop = {
3636
});
3737
},
3838
getData: function(image) {
39+
var options = {kernel: sharp.kernel.cubic, interpolator: sharp.interpolator.bilinear};
3940
return image._sharp
40-
.resize(image.width, image.height)
41+
.resize(image.width, image.height, options)
4142
.raw()
4243
.toBuffer()
4344
.then(function(data) {

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "smartcrop-sharp",
3-
"version": "1.0.5",
3+
"version": "2.0.0",
44
"description": "smartcrop adapter for sharp",
55
"main": "index.js",
66
"scripts": {
@@ -9,7 +9,7 @@
99
"author": "Jonas Wagner <[email protected]>",
1010
"license": "MIT",
1111
"dependencies": {
12-
"smartcrop": "^1.1.1"
12+
"smartcrop": "^2.0.1"
1313
},
1414
"peerDependencies": {
1515
"sharp": "^0.19.0"

0 commit comments

Comments
 (0)