New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@jimp/plugin-crop

Package Overview
Dependencies
Maintainers
2
Versions
242
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jimp/plugin-crop - npm Package Compare versions

Comparing version 0.8.5-canary.800.426.0 to 0.8.5-canary.753c2c9.0

12

dist/index.js

@@ -40,3 +40,3 @@ "use strict";

var start = w * y + x << 2;
var end = start + h * w << 2;
var end = start + h * w << 2 + 1;
this.bitmap.data = this.bitmap.data.slice(start, end);

@@ -234,13 +234,13 @@ } else {

southPixelsToCrop = vertical;
} // make sure that crops are >= 0
} // safety checks
var widthOfRemainingPixels = w - (westPixelsToCrop + eastPixelsToCrop);
var heightOfRemainingPixels = h - (southPixelsToCrop + northPixelsToCrop); // make sure that crops are > 0
westPixelsToCrop = westPixelsToCrop >= 0 ? westPixelsToCrop : 0;
eastPixelsToCrop = eastPixelsToCrop >= 0 ? eastPixelsToCrop : 0;
northPixelsToCrop = northPixelsToCrop >= 0 ? northPixelsToCrop : 0;
southPixelsToCrop = southPixelsToCrop >= 0 ? southPixelsToCrop : 0; // safety checks
southPixelsToCrop = southPixelsToCrop >= 0 ? southPixelsToCrop : 0;
var widthOfRemainingPixels = w - (westPixelsToCrop + eastPixelsToCrop);
var heightOfRemainingPixels = h - (southPixelsToCrop + northPixelsToCrop);
if (cropOnlyFrames) {

@@ -247,0 +247,0 @@ // crop image if all sides should be cropped

@@ -27,3 +27,3 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

var start = w * y + x << 2;
var end = start + h * w << 2;
var end = start + h * w << 2 + 1;
this.bitmap.data = this.bitmap.data.slice(start, end);

@@ -221,13 +221,13 @@ } else {

southPixelsToCrop = vertical;
} // make sure that crops are >= 0
} // safety checks
var widthOfRemainingPixels = w - (westPixelsToCrop + eastPixelsToCrop);
var heightOfRemainingPixels = h - (southPixelsToCrop + northPixelsToCrop); // make sure that crops are > 0
westPixelsToCrop = westPixelsToCrop >= 0 ? westPixelsToCrop : 0;
eastPixelsToCrop = eastPixelsToCrop >= 0 ? eastPixelsToCrop : 0;
northPixelsToCrop = northPixelsToCrop >= 0 ? northPixelsToCrop : 0;
southPixelsToCrop = southPixelsToCrop >= 0 ? southPixelsToCrop : 0; // safety checks
southPixelsToCrop = southPixelsToCrop >= 0 ? southPixelsToCrop : 0;
var widthOfRemainingPixels = w - (westPixelsToCrop + eastPixelsToCrop);
var heightOfRemainingPixels = h - (southPixelsToCrop + northPixelsToCrop);
if (cropOnlyFrames) {

@@ -234,0 +234,0 @@ // crop image if all sides should be cropped

{
"name": "@jimp/plugin-crop",
"version": "0.8.5-canary.800.426.0",
"version": "0.8.5-canary.753c2c9.0",
"description": "crop an image.",

@@ -23,8 +23,8 @@ "main": "dist/index.js",

"dependencies": {
"@jimp/utils": "0.8.5-canary.800.426.0",
"@jimp/utils": "0.8.5-canary.753c2c9.0",
"core-js": "^2.5.7"
},
"devDependencies": {
"@jimp/custom": "0.8.5-canary.800.426.0",
"@jimp/test-utils": "0.8.5-canary.800.426.0"
"@jimp/custom": "0.8.5-canary.753c2c9.0",
"@jimp/test-utils": "0.8.5-canary.753c2c9.0"
},

@@ -37,3 +37,3 @@ "peerDependencies": {

},
"gitHead": "eea6165d7a8ee65bce94db45d530aa45bba72af1"
"gitHead": "753c2c99505ea4cc87aeb1ac9def054b52a2e90c"
}

@@ -146,2 +146,3 @@ /* eslint-disable no-labels */

}
// this row contains all pixels with the same color: increment this side pixels to crop

@@ -163,2 +164,3 @@ northPixelsToCrop++;

}
// this column contains all pixels with the same color: increment this side pixels to crop

@@ -184,2 +186,3 @@ eastPixelsToCrop++;

}
// this row contains all pixels with the same color: increment this side pixels to crop

@@ -205,2 +208,3 @@ southPixelsToCrop++;

}
// this column contains all pixels with the same color: increment this side pixels to crop

@@ -207,0 +211,0 @@ westPixelsToCrop++;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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