@thi.ng/pixel-analysis 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -1
- package/README.md +1 -1
- package/analyze-colors.js +1 -1
- package/hues.js +3 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
- **Last updated**: 2025-07-
|
|
3
|
+
- **Last updated**: 2025-07-26T12:33:06Z
|
|
4
4
|
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
|
|
5
5
|
|
|
6
6
|
All notable changes to this project will be documented in this file.
|
|
@@ -11,6 +11,15 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
|
|
|
11
11
|
**Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
|
|
12
12
|
and/or version bumps of transitive dependencies.
|
|
13
13
|
|
|
14
|
+
### [1.0.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/pixel-analysis@1.0.1) (2025-07-24)
|
|
15
|
+
|
|
16
|
+
#### 🩹 Bug fixes
|
|
17
|
+
|
|
18
|
+
- bail out if insufficient samples ([41ba4c3](https://github.com/thi-ng/umbrella/commit/41ba4c3))
|
|
19
|
+
- update `temperature()` to return empty result if insufficient color samples
|
|
20
|
+
- update hue standard deviation ([9b0ea02](https://github.com/thi-ng/umbrella/commit/9b0ea02))
|
|
21
|
+
- return normalized hue SD (not in radians)
|
|
22
|
+
|
|
14
23
|
# [1.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/pixel-analysis@1.0.0) (2025-07-24)
|
|
15
24
|
|
|
16
25
|
#### 🛑 Breaking changes
|
package/README.md
CHANGED
package/analyze-colors.js
CHANGED
package/hues.js
CHANGED
|
@@ -77,6 +77,9 @@ const temperature = (colors, minSat = 0.2) => {
|
|
|
77
77
|
return num >= 1 ? repeat(hue * TAU, num) : null;
|
|
78
78
|
}, hues)
|
|
79
79
|
];
|
|
80
|
+
if (!angles.length) {
|
|
81
|
+
return { hues, meanHue: 0, temp: 0, areaTemp: 0, area: 0 };
|
|
82
|
+
}
|
|
80
83
|
const meanHue = circularMean(angles) / TAU;
|
|
81
84
|
const temp = hueTemperature(meanHue);
|
|
82
85
|
const areaTemp = temp * area;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/pixel-analysis",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Image color & feature analysis utilities",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@thi.ng/api": "^8.11.32",
|
|
43
43
|
"@thi.ng/arrays": "^2.13.5",
|
|
44
|
-
"@thi.ng/color": "^5.7.
|
|
44
|
+
"@thi.ng/color": "^5.7.52",
|
|
45
45
|
"@thi.ng/compare": "^2.4.24",
|
|
46
46
|
"@thi.ng/math": "^5.11.32",
|
|
47
47
|
"@thi.ng/pixel": "^7.5.4",
|
|
48
48
|
"@thi.ng/pixel-convolve": "^1.1.4",
|
|
49
|
-
"@thi.ng/pixel-dominant-colors": "^2.0.
|
|
49
|
+
"@thi.ng/pixel-dominant-colors": "^2.0.7",
|
|
50
50
|
"@thi.ng/transducers": "^9.6.3",
|
|
51
|
-
"@thi.ng/vectors": "^8.5.
|
|
51
|
+
"@thi.ng/vectors": "^8.5.1"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"esbuild": "^0.25.8",
|
|
@@ -112,5 +112,5 @@
|
|
|
112
112
|
"status": "beta",
|
|
113
113
|
"year": 2024
|
|
114
114
|
},
|
|
115
|
-
"gitHead": "
|
|
115
|
+
"gitHead": "b138ae2fb8567acfe724cc675654878f60d26631\n"
|
|
116
116
|
}
|