@thi.ng/imago 0.5.0 → 0.5.1
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 +1 -1
- package/README.md +12 -15
- package/package.json +15 -15
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
<!-- This file is generated - DO NOT EDIT! -->
|
|
2
2
|
<!-- Please see: https://github.com/thi-ng/umbrella/blob/develop/CONTRIBUTING.md#changes-to-readme-files -->
|
|
3
|
-
> [!IMPORTANT]
|
|
4
|
-
> ‼️ Announcing the thi.ng user survey 2024 📋
|
|
5
|
-
>
|
|
6
|
-
> [Please participate in the survey here!](https://forms.gle/XacbSDEmQMPZg8197)\
|
|
7
|
-
> (open until end of February)
|
|
8
|
-
>
|
|
9
|
-
> **To achieve a better sample size, I'd highly appreciate if you could
|
|
10
|
-
> circulate the link to this survey in your own networks.**
|
|
11
|
-
>
|
|
12
|
-
> [Discussion](https://github.com/thi-ng/umbrella/discussions/447)
|
|
13
|
-
|
|
14
3
|
# 
|
|
15
4
|
|
|
16
5
|
[](https://www.npmjs.com/package/@thi.ng/imago)
|
|
@@ -22,7 +11,7 @@
|
|
|
22
11
|
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
23
12
|
> and anti-framework.
|
|
24
13
|
>
|
|
25
|
-
> 🚀
|
|
14
|
+
> 🚀 Please help me to work full-time on these projects by [sponsoring me on
|
|
26
15
|
> GitHub](https://github.com/sponsors/postspectacular). Thank you! ❤️
|
|
27
16
|
|
|
28
17
|
- [About](#about)
|
|
@@ -33,6 +22,7 @@
|
|
|
33
22
|
- [Common options](#common-options)
|
|
34
23
|
- [Bitmap image layers](#bitmap-image-layers)
|
|
35
24
|
- [Color layers](#color-layers)
|
|
25
|
+
- [Raw bitmap layers](#raw-bitmap-layers)
|
|
36
26
|
- [SVG layers](#svg-layers)
|
|
37
27
|
- [Text layers](#text-layers)
|
|
38
28
|
- [crop](#crop)
|
|
@@ -123,7 +113,7 @@ The following pipeline performs these steps (in sequence):
|
|
|
123
113
|
},
|
|
124
114
|
{ "op": "crop", "size": [240, 240], "gravity": "c" },
|
|
125
115
|
{ "op": "output", "id": "thumb", "path": "{name}-thumb.jpg" },
|
|
126
|
-
{ "op": "output", "id": "hash", "
|
|
116
|
+
{ "op": "output", "id": "hash", "blurhash": 4 }
|
|
127
117
|
]
|
|
128
118
|
```
|
|
129
119
|
|
|
@@ -174,6 +164,10 @@ function.
|
|
|
174
164
|
- size
|
|
175
165
|
- fill color (w/ alpha)
|
|
176
166
|
|
|
167
|
+
#### Raw bitmap layers
|
|
168
|
+
|
|
169
|
+
- from typed array or buffer
|
|
170
|
+
|
|
177
171
|
#### SVG layers
|
|
178
172
|
|
|
179
173
|
- from file or inline doc
|
|
@@ -190,7 +184,7 @@ function.
|
|
|
190
184
|
|
|
191
185
|
Cropping a part of the image
|
|
192
186
|
|
|
193
|
-
- from edges or
|
|
187
|
+
- from edges, defined region or size & aspect ratio only
|
|
194
188
|
- supports px or percent units
|
|
195
189
|
- proportional to a given reference side/size
|
|
196
190
|
|
|
@@ -392,7 +386,10 @@ import { ConsoleLogger } from "@thi.ng/logger";
|
|
|
392
386
|
|
|
393
387
|
const res = await processImage(
|
|
394
388
|
"test.jpg",
|
|
395
|
-
// operator pipeline
|
|
389
|
+
// operator pipeline (i.e. a nested array of operator spec objects)
|
|
390
|
+
// the functions used here are merely syntax sugar for generating
|
|
391
|
+
// the spec objects to provide an anchor point for docs
|
|
392
|
+
// (ongoing effort, but since still a new project, mostly still forthcoming...)
|
|
396
393
|
[
|
|
397
394
|
// auto-rotate (EXIF orientation)
|
|
398
395
|
rotate({}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/imago",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "JSON & API-based declarative and extensible image processing trees/pipelines",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -35,23 +35,23 @@
|
|
|
35
35
|
"test": "bun test"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@thi.ng/api": "^8.9.
|
|
39
|
-
"@thi.ng/associative": "^6.3.
|
|
40
|
-
"@thi.ng/blurhash": "^0.1.
|
|
41
|
-
"@thi.ng/checks": "^3.5.
|
|
42
|
-
"@thi.ng/date": "^2.7.
|
|
43
|
-
"@thi.ng/defmulti": "^3.0.
|
|
44
|
-
"@thi.ng/errors": "^2.4.
|
|
45
|
-
"@thi.ng/file-io": "^1.3.
|
|
46
|
-
"@thi.ng/logger": "^3.0.
|
|
47
|
-
"@thi.ng/pixel": "^6.1.
|
|
48
|
-
"@thi.ng/pixel-dither": "^1.1.
|
|
49
|
-
"@thi.ng/prefixes": "^2.3.
|
|
38
|
+
"@thi.ng/api": "^8.9.27",
|
|
39
|
+
"@thi.ng/associative": "^6.3.44",
|
|
40
|
+
"@thi.ng/blurhash": "^0.1.12",
|
|
41
|
+
"@thi.ng/checks": "^3.5.1",
|
|
42
|
+
"@thi.ng/date": "^2.7.3",
|
|
43
|
+
"@thi.ng/defmulti": "^3.0.27",
|
|
44
|
+
"@thi.ng/errors": "^2.4.19",
|
|
45
|
+
"@thi.ng/file-io": "^1.3.5",
|
|
46
|
+
"@thi.ng/logger": "^3.0.4",
|
|
47
|
+
"@thi.ng/pixel": "^6.1.14",
|
|
48
|
+
"@thi.ng/pixel-dither": "^1.1.112",
|
|
49
|
+
"@thi.ng/prefixes": "^2.3.11",
|
|
50
50
|
"sharp": "^0.33.2"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@microsoft/api-extractor": "^7.40.1",
|
|
54
|
-
"@thi.ng/vectors": "^7.10.
|
|
54
|
+
"@thi.ng/vectors": "^7.10.14",
|
|
55
55
|
"esbuild": "^0.20.0",
|
|
56
56
|
"rimraf": "^5.0.5",
|
|
57
57
|
"typedoc": "^0.25.7",
|
|
@@ -180,5 +180,5 @@
|
|
|
180
180
|
"status": "alpha",
|
|
181
181
|
"year": 2024
|
|
182
182
|
},
|
|
183
|
-
"gitHead": "
|
|
183
|
+
"gitHead": "d660ae8fd1bf64d919b4334f19509f1f539d70f6\n"
|
|
184
184
|
}
|