Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

smartcrop

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

smartcrop - npm Package Compare versions

Comparing version 1.1.1 to 2.0.0

10

package.json
{
"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);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc