smartcrop-sharp
Advanced tools
Comparing version 1.0.5 to 2.0.0
@@ -39,4 +39,5 @@ var smartcrop = require('smartcrop'); | ||
getData: function(image) { | ||
var options = {kernel: sharp.kernel.cubic, interpolator: sharp.interpolator.bilinear}; | ||
return image._sharp | ||
.resize(image.width, image.height) | ||
.resize(image.width, image.height, options) | ||
.raw() | ||
@@ -43,0 +44,0 @@ .toBuffer() |
{ | ||
"name": "smartcrop-sharp", | ||
"version": "1.0.5", | ||
"version": "2.0.0", | ||
"description": "smartcrop adapter for sharp", | ||
@@ -13,3 +13,3 @@ "main": "index.js", | ||
"sharp": "^0.16.0", | ||
"smartcrop": "^1.1.1" | ||
"smartcrop": "^2.0.1" | ||
}, | ||
@@ -16,0 +16,0 @@ "devDependencies": { |
@@ -51,1 +51,8 @@ # smartcrop-sharp | ||
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. | ||
## Changelog | ||
### 2.0 (beta) | ||
It's faster. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5158
60
58
+ Addedsmartcrop@2.0.5(transitive)
- Removedsmartcrop@1.1.1(transitive)
Updatedsmartcrop@^2.0.1