@thi.ng/imago 1.5.10 → 1.6.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/README.md +1 -1
- package/api.d.ts +7 -0
- package/package.json +7 -7
- package/proc.js +3 -1
package/README.md
CHANGED
package/api.d.ts
CHANGED
|
@@ -434,6 +434,13 @@ export interface ImgProcOpts {
|
|
|
434
434
|
* Base directory for {@link output} steps
|
|
435
435
|
*/
|
|
436
436
|
outDir: string;
|
|
437
|
+
/**
|
|
438
|
+
* Only used when loading images from file or buffer. Auto-orients the image
|
|
439
|
+
* based on the EXIF `Orientation` tag, if present.
|
|
440
|
+
*
|
|
441
|
+
* @defaultValue true
|
|
442
|
+
*/
|
|
443
|
+
autoOrient: boolean;
|
|
437
444
|
/**
|
|
438
445
|
* By default all input metadata will be lost in the output(s). If this
|
|
439
446
|
* option is enabled, keeps existing EXIF data and attaches it to output
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/imago",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"description": "JSON & API-based declarative and extensible image processing trees/pipelines",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
"@thi.ng/api": "^8.12.16",
|
|
44
44
|
"@thi.ng/blurhash": "^1.0.38",
|
|
45
45
|
"@thi.ng/checks": "^3.8.6",
|
|
46
|
-
"@thi.ng/date": "^2.7.
|
|
47
|
-
"@thi.ng/defmulti": "^3.0.
|
|
46
|
+
"@thi.ng/date": "^2.7.80",
|
|
47
|
+
"@thi.ng/defmulti": "^3.0.93",
|
|
48
48
|
"@thi.ng/errors": "^2.6.5",
|
|
49
|
-
"@thi.ng/file-io": "^2.2.
|
|
50
|
-
"@thi.ng/logger": "^3.
|
|
49
|
+
"@thi.ng/file-io": "^2.2.27",
|
|
50
|
+
"@thi.ng/logger": "^3.3.0",
|
|
51
51
|
"@thi.ng/object-utils": "^1.3.8",
|
|
52
52
|
"@thi.ng/pixel": "^7.5.25",
|
|
53
53
|
"@thi.ng/pixel-dither": "^1.1.193",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"sharp": "^0.34.5"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@thi.ng/vectors": "^8.6.
|
|
58
|
+
"@thi.ng/vectors": "^8.6.23",
|
|
59
59
|
"@types/node": "^24.10.9",
|
|
60
60
|
"esbuild": "^0.27.2",
|
|
61
61
|
"typedoc": "^0.28.16",
|
|
@@ -193,5 +193,5 @@
|
|
|
193
193
|
"status": "alpha",
|
|
194
194
|
"year": 2024
|
|
195
195
|
},
|
|
196
|
-
"gitHead": "
|
|
196
|
+
"gitHead": "7a21075f27ba00b28a6eb77e70918a4c7f4e6e68\n"
|
|
197
197
|
}
|
package/proc.js
CHANGED
|
@@ -21,7 +21,9 @@ import { rotateProc } from "./ops/rotate.js";
|
|
|
21
21
|
import { ensureSize, isIntBufferLike } from "./utils.js";
|
|
22
22
|
const LOGGER = ROOT.childLogger("imgproc");
|
|
23
23
|
const processImage = async (src, specs, opts = {}, parentCtx) => {
|
|
24
|
-
let img = isString(src) || isArrayBufferView(src) ? sharp(src
|
|
24
|
+
let img = isString(src) || isArrayBufferView(src) ? sharp(src, {
|
|
25
|
+
autoOrient: opts.autoOrient !== false
|
|
26
|
+
}) : isIntBufferLike(src) ? sharp(new Uint8Array(src.data.buffer), {
|
|
25
27
|
raw: {
|
|
26
28
|
width: src.width,
|
|
27
29
|
height: src.height,
|