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

@revizly/sharp

Package Overview
Dependencies
Maintainers
0
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@revizly/sharp - npm Package Compare versions

Comparing version 0.33.4-revizly5 to 0.33.4-revizly6

24

lib/operation.js

@@ -790,3 +790,3 @@ // Copyright 2013 Lovell Fuller and others.

*
* @param {Array<Array<number>>} inputMatrix - 3x3 Recombination matrix
* @param {Array<Array<number>>} inputMatrix - 3x3 or 4x4 Recombination matrix
* @returns {Sharp}

@@ -796,15 +796,13 @@ * @throws {Error} Invalid parameters

function recomb (inputMatrix) {
if (!Array.isArray(inputMatrix) || inputMatrix.length !== 3 ||
inputMatrix[0].length !== 3 ||
inputMatrix[1].length !== 3 ||
inputMatrix[2].length !== 3
) {
// must pass in a kernel
throw new Error('Invalid recombination matrix');
if (!Array.isArray(inputMatrix)) {
throw is.invalidParameterError('inputMatrix', 'array', inputMatrix);
}
this.options.recombMatrix = [
inputMatrix[0][0], inputMatrix[0][1], inputMatrix[0][2],
inputMatrix[1][0], inputMatrix[1][1], inputMatrix[1][2],
inputMatrix[2][0], inputMatrix[2][1], inputMatrix[2][2]
].map(Number);
if (inputMatrix.length !== 3 && inputMatrix.length !== 4) {
throw is.invalidParameterError('inputMatrix', '3x3 or 4x4 array', inputMatrix.length);
}
const recombMatrix = inputMatrix.flat().map(Number);
if (recombMatrix.length !== 9 && recombMatrix.length !== 16) {
throw is.invalidParameterError('inputMatrix', 'cardinality of 9 or 16', recombMatrix.length);
}
this.options.recombMatrix = recombMatrix;
return this;

@@ -811,0 +809,0 @@ }

{
"name": "@revizly/sharp",
"description": "High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images",
"version": "0.33.4-revizly5",
"version": "0.33.4-revizly6",
"author": "Lovell Fuller <npm@lovell.info>",

@@ -6,0 +6,0 @@ "homepage": "https://sharp.pixelplumbing.com",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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