Huge News!Announcing our $40M Series B led by Abstract Ventures.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.6.4 to 0.6.5-canary.784.118.0

8

dist/index.js

@@ -221,6 +221,6 @@ "use strict";

westPixelsToCrop = westPixelsToCrop - leaveBorder;
eastPixelsToCrop = eastPixelsToCrop - leaveBorder;
northPixelsToCrop = northPixelsToCrop - leaveBorder;
southPixelsToCrop = southPixelsToCrop - leaveBorder;
westPixelsToCrop -= leaveBorder;
eastPixelsToCrop -= leaveBorder;
northPixelsToCrop -= leaveBorder;
southPixelsToCrop -= leaveBorder;

@@ -227,0 +227,0 @@ if (cropSymmetric) {

@@ -208,6 +208,6 @@ 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); }

westPixelsToCrop = westPixelsToCrop - leaveBorder;
eastPixelsToCrop = eastPixelsToCrop - leaveBorder;
northPixelsToCrop = northPixelsToCrop - leaveBorder;
southPixelsToCrop = southPixelsToCrop - leaveBorder;
westPixelsToCrop -= leaveBorder;
eastPixelsToCrop -= leaveBorder;
northPixelsToCrop -= leaveBorder;
southPixelsToCrop -= leaveBorder;

@@ -214,0 +214,0 @@ if (cropSymmetric) {

{
"name": "@jimp/plugin-crop",
"version": "0.6.4",
"version": "0.6.5-canary.784.118.0",
"description": "crop an image.",

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

"dependencies": {
"@jimp/utils": "^0.6.4",
"@jimp/utils": "0.6.5-canary.784.118.0",
"core-js": "^2.5.7"
},
"devDependencies": {
"@jimp/custom": "^0.6.4",
"@jimp/test-utils": "^0.6.4"
"@jimp/custom": "0.6.5-canary.784.118.0",
"@jimp/test-utils": "0.6.5-canary.784.118.0"
},

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

},
"gitHead": "7c9d3c817cade88d4a20422be10670d3c1528429"
"gitHead": "20a24e11c6ef9b5ff9ed731f9a2d356fb8142518"
}

@@ -210,6 +210,6 @@ /* eslint-disable no-labels */

// apply leaveBorder
westPixelsToCrop = westPixelsToCrop - leaveBorder;
eastPixelsToCrop = eastPixelsToCrop - leaveBorder;
northPixelsToCrop = northPixelsToCrop - leaveBorder;
southPixelsToCrop = southPixelsToCrop - leaveBorder;
westPixelsToCrop -= leaveBorder;
eastPixelsToCrop -= leaveBorder;
northPixelsToCrop -= leaveBorder;
southPixelsToCrop -= leaveBorder;

@@ -216,0 +216,0 @@ if (cropSymmetric) {

@@ -286,36 +286,2 @@ import { Jimp, mkJGD } from '@jimp/test-utils';

});
it('image with top and bottom frame and leaveBorder', async () => {
const imgSrc = await Jimp.read(
mkJGD(
'▥▥▥▥▥▥▥▥',
'▥▥▥▥▥▥▥▥',
'▥▥▥▥▥▥▥▥',
' ◆◆ ',
' ◆▦▦◆ ',
' ◆▦▦▦▦◆ ',
' ◆▦▦◆ ',
' ◆◆ ',
'▥▥▥▥▥▥▥▥',
'▥▥▥▥▥▥▥▥',
'▥▥▥▥▥▥▥▥'
)
);
imgSrc
.autocrop({ cropSymmetric: true, cropOnlyFrames: false, leaveBorder: 2 })
.getJGDSync()
.should.be.sameJGD(
mkJGD(
'▥▥▥▥▥▥▥▥',
'▥▥▥▥▥▥▥▥',
' ◆◆ ',
' ◆▦▦◆ ',
' ◆▦▦▦▦◆ ',
' ◆▦▦◆ ',
' ◆◆ ',
'▥▥▥▥▥▥▥▥',
'▥▥▥▥▥▥▥▥'
)
);
});
});

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