Comparing version 1.1.1 to 2.0.0
{ | ||
"name": "smartcrop", | ||
"version": "1.1.1", | ||
"version": "2.0.0", | ||
"description": "Content aware image cropping.", | ||
@@ -11,4 +11,5 @@ "homepage": "https://github.com/jwagner/smartcrop.js", | ||
"benchmark": "~1.0.0", | ||
"chai": "^1.9.1", | ||
"chai": "^3.5.0", | ||
"grunt": "^0.4.4", | ||
"grunt-cli": "^1.2.0", | ||
"grunt-contrib-connect": "~0.7.1", | ||
@@ -22,4 +23,4 @@ "grunt-contrib-watch": "~0.6.1", | ||
"microtime": "^2.0.0", | ||
"mocha": "^1.18.2", | ||
"promise-polyfill": "^5.2.1" | ||
"mocha": "^3.0.2", | ||
"promise-polyfill": "^6.0.2" | ||
}, | ||
@@ -32,4 +33,5 @@ "license": "MIT", | ||
"scripts": { | ||
"start": "grunt", | ||
"test": "./node_modules/.bin/karma start karma.conf.js" | ||
} | ||
} |
@@ -161,2 +161,7 @@ # smartcrop.js | ||
### 2.0.0 (beta) | ||
In short: It's a lot faster when calculating bigger crops. | ||
The quality of the crops should be comparable but the could be radically different, | ||
so this will be a major release. | ||
### 1.1.1 | ||
@@ -163,0 +168,0 @@ Removed useless files from npm package. |
@@ -91,4 +91,6 @@ /** | ||
// open the image | ||
return iop.open(inputImage, options.input).then(function(image) { | ||
// calculate desired crop dimensions based on the image size | ||
if (options.width && options.height) { | ||
@@ -103,4 +105,5 @@ scale = min(image.width / options.width, image.height / options.height); | ||
// prescale if possible | ||
if (options.prescale !== false) { | ||
prescale = 1 / scale / options.minScale; | ||
prescale = min(max(256 / image.width, 256 / image.height), 1); | ||
if (prescale < 1) { | ||
@@ -107,0 +110,0 @@ image = iop.resample(image, image.width * prescale, image.height * prescale); |
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
25173
491
179
15