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

@jimp/plugin-color

Package Overview
Dependencies
Maintainers
2
Versions
243
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jimp/plugin-color - npm Package Compare versions

Comparing version 1.1.2 to 1.1.3--canary.34e8f3b.0

.turbo/turbo-lint.log

1

.tshy/build.json

@@ -5,3 +5,2 @@ {

"rootDir": "../src",
"target": "es2022",
"module": "nodenext",

@@ -8,0 +7,0 @@ "moduleResolution": "nodenext"

@@ -6,7 +6,9 @@ {

"../src/**/*.cts",
"../src/**/*.tsx"
"../src/**/*.tsx",
"../src/**/*.json"
],
"exclude": [
"../**/*.test.ts",
"../src/**/*.mts"
"../src/**/*.mts",
"../src/package.json"
],

@@ -13,0 +15,0 @@ "compilerOptions": {

@@ -6,6 +6,8 @@ {

"../src/**/*.mts",
"../src/**/*.tsx"
"../src/**/*.tsx",
"../src/**/*.json"
],
"exclude": [
"../**/*.test.ts"
"../**/*.test.ts",
"../src/package.json"
],

@@ -12,0 +14,0 @@ "compilerOptions": {

@@ -7,3 +7,3 @@ # v1.1.2 (Mon Sep 02 2024)

This PR changes the `brightness` function to behave like the css brightness function and other implementations. Previously it was doing something odd. Instead of multiplying the color channel by the multiplier value, it multiplied against the inversion of the current color.
This PR changes the `brightness` function to behave like the css brightness function and other implementations. Previously it was doing something odd. Instead of multiplying the color channel by the multiplier value, it multiplied against the inversion of the current color.

@@ -10,0 +10,0 @@ In the current version a value of `1` won't change the colors at all. Values above 1 will brighten the colors, values below 1 will darken the colors.

{
"name": "@jimp/plugin-color",
"version": "1.1.2",
"version": "1.1.3--canary.34e8f3b.0",
"repository": "jimp-dev/jimp",
"engines": {
"node": ">=18"
},
"scripts": {

@@ -16,23 +19,23 @@ "lint": "eslint .",

"devDependencies": {
"@jimp/config-eslint": "1.1.2",
"@jimp/config-typescript": "1.1.2",
"@jimp/config-vitest": "1.1.2",
"@jimp/js-jpeg": "1.1.2",
"@jimp/js-png": "1.1.2",
"@jimp/test-utils": "1.1.2",
"@types/node": "^20.12.5",
"@jimp/config-eslint": "1.1.3--canary.34e8f3b.0",
"@jimp/config-typescript": "1.1.3--canary.34e8f3b.0",
"@jimp/config-vitest": "1.1.3--canary.34e8f3b.0",
"@jimp/js-jpeg": "1.1.3--canary.34e8f3b.0",
"@jimp/js-png": "1.1.3--canary.34e8f3b.0",
"@jimp/test-utils": "1.1.3--canary.34e8f3b.0",
"@types/node": "^18.19.48",
"@types/tinycolor2": "^1.4.6",
"@vitest/browser": "^1.4.0",
"eslint": "^8.57.0",
"tshy": "^1.12.0",
"@vitest/browser": "^2.0.5",
"eslint": "^9.9.1",
"tshy": "^3.0.2",
"typescript": "^5.5.4",
"vite-plugin-node-polyfills": "^0.21.0",
"vitest": "^1.4.0"
"vite-plugin-node-polyfills": "^0.22.0",
"vitest": "^2.0.5"
},
"dependencies": {
"@jimp/core": "1.1.2",
"@jimp/types": "1.1.2",
"@jimp/utils": "1.1.2",
"@jimp/core": "1.1.3--canary.34e8f3b.0",
"@jimp/types": "1.1.3--canary.34e8f3b.0",
"@jimp/utils": "1.1.3--canary.34e8f3b.0",
"tinycolor2": "^1.6.0",
"zod": "^3.22.4"
"zod": "^3.23.8"
},

@@ -68,3 +71,4 @@ "tshy": {

"sideEffects": false,
"gitHead": "ba9de4df25a2f0e41f11a68c7aa50181a52115cb"
"module": "./dist/esm/index.js",
"gitHead": "34e8f3bbb3f0392953c609a6d4f6e4ec4acb092e"
}

@@ -22,4 +22,4 @@ import { expect, test, describe } from "vitest";

"22222222",
"22222222"
)
"22222222",
),
);

@@ -36,4 +36,4 @@ /** stores the Jimp instances of the JGD images above. */

"22222222",
"22222222"
)
"22222222",
),
);

@@ -54,3 +54,3 @@

expect(
imgMid.clone().convolution({ kernel: sharpM, edgeHandling: Edge.WRAP })
imgMid.clone().convolution({ kernel: sharpM, edgeHandling: Edge.WRAP }),
).toMatchSnapshot();

@@ -60,3 +60,3 @@ expect(

.clone()
.convolution({ kernel: sharpM, edgeHandling: Edge.WRAP })
.convolution({ kernel: sharpM, edgeHandling: Edge.WRAP }),
).toMatchSnapshot();

@@ -67,3 +67,3 @@ });

expect(
imgMid.clone().convolution({ kernel: sharpM, edgeHandling: Edge.CROP })
imgMid.clone().convolution({ kernel: sharpM, edgeHandling: Edge.CROP }),
).toMatchSnapshot();

@@ -73,5 +73,5 @@ expect(

.clone()
.convolution({ kernel: sharpM, edgeHandling: Edge.CROP })
.convolution({ kernel: sharpM, edgeHandling: Edge.CROP }),
).toMatchSnapshot();
});
});

@@ -31,3 +31,3 @@ import { expect, test, describe } from "vitest";

expect(
image.color([{ apply: "brighten", params: [25] }])
image.color([{ apply: "brighten", params: [25] }]),
).toMatchSnapshot();

@@ -34,0 +34,0 @@ });

@@ -65,3 +65,3 @@ import tinyColor from "tinycolor2";

x: number,
y: number
y: number,
) {

@@ -301,3 +301,3 @@ const value = [0, 0, 0, 0] as [number, number, number, number];

bounds.r[0]!,
bounds.r[1]!
bounds.r[1]!,
);

@@ -307,3 +307,3 @@ image.bitmap.data[idx + 1] = normalizeValue(

bounds.g[0]!,
bounds.g[1]!
bounds.g[1]!,
);

@@ -313,3 +313,3 @@ image.bitmap.data[idx + 2] = normalizeValue(

bounds.b[0]!,
bounds.b[1]!
bounds.b[1]!,
);

@@ -316,0 +316,0 @@ });

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