@thi.ng/pixel-io-netpbm 2.1.35 → 2.1.37

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2022-12-16T12:52:25Z
3
+ - **Last updated**: 2022-12-22T21:47:07Z
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.
package/README.md CHANGED
@@ -19,7 +19,7 @@ This project is part of the
19
19
 
20
20
  ## About
21
21
 
22
- Multi-format NetPBM reader & writer support for @thi.ng/pixel
22
+ Multi-format NetPBM reader & writer support for [@thi.ng/pixel](https://github.com/thi-ng/umbrella/tree/develop/packages/pixel).
23
23
 
24
24
  This package can read & write binary
25
25
  [NetPBM](https://en.wikipedia.org/wiki/Netpbm) image formats from byte
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/pixel-io-netpbm",
3
- "version": "2.1.35",
3
+ "version": "2.1.37",
4
4
  "description": "Multi-format NetPBM reader & writer support for @thi.ng/pixel",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -34,13 +34,13 @@
34
34
  "test": "testament test"
35
35
  },
36
36
  "dependencies": {
37
- "@thi.ng/api": "^8.6.0",
38
- "@thi.ng/errors": "^2.2.6",
39
- "@thi.ng/pixel": "^4.0.11"
37
+ "@thi.ng/api": "^8.6.2",
38
+ "@thi.ng/errors": "^2.2.7",
39
+ "@thi.ng/pixel": "^4.0.13"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@microsoft/api-extractor": "^7.33.7",
43
- "@thi.ng/testament": "^0.3.7",
43
+ "@thi.ng/testament": "^0.3.8",
44
44
  "rimraf": "^3.0.2",
45
45
  "tools": "^0.0.1",
46
46
  "typedoc": "^0.23.22",
@@ -86,5 +86,5 @@
86
86
  "parent": "@thi.ng/pixel",
87
87
  "year": 2021
88
88
  },
89
- "gitHead": "f445a9cc8022bcdebbf6ff91fd66ced016d72f01\n"
89
+ "gitHead": "bc6f7f5e2765bb96fe64db804eaf4b2443b47fc6\n"
90
90
  }
package/read.d.ts CHANGED
@@ -13,7 +13,8 @@ export declare const parseHeader: (src: Uint8Array) => {
13
13
  };
14
14
  /**
15
15
  * Takes a PBM/PGM/PPM file as byte array and parses it into a
16
- * {@link @thi.ng/pixel#IntBuffer} of corresponding format.
16
+ * [`IntBuffer`](https://docs.thi.ng/umbrella/pixel/classes/IntBuffer.html) of
17
+ * corresponding format.
17
18
  *
18
19
  * @remarks
19
20
  * Depending on header information, the following rules apply:
@@ -31,8 +32,9 @@ export declare const parseHeader: (src: Uint8Array) => {
31
32
  export declare const read: (src: Uint8Array) => import("@thi.ng/pixel/int").IntBuffer;
32
33
  /**
33
34
  * Reads pixels from given 1bit PBM file byte buffer, starting at index `i` and
34
- * returns {@link @thi.ng/pixel#IntBuffer} in `GRAY8` format (due to current
35
- * lack of true 1bit format).
35
+ * returns
36
+ * [`IntBuffer`](https://docs.thi.ng/umbrella/pixel/classes/IntBuffer.html) in
37
+ * `GRAY8` format (due to current lack of true 1bit format).
36
38
  *
37
39
  * @param src -
38
40
  * @param i -
@@ -42,9 +44,10 @@ export declare const read: (src: Uint8Array) => import("@thi.ng/pixel/int").IntB
42
44
  export declare const readPBM: (src: Uint8Array, i: number, width: number, height: number) => import("@thi.ng/pixel/int").IntBuffer;
43
45
  /**
44
46
  * Reads pixels from given 8bit PGM file byte buffer, starting at index `i` and
45
- * returns {@link @thi.ng/pixel#IntBuffer} in `GRAY8` format. If needed,
46
- * pixel values are rescaled given `max` value defined in PGM header (MUST
47
- * be <= 0xff).
47
+ * returns
48
+ * [`IntBuffer`](https://docs.thi.ng/umbrella/pixel/classes/IntBuffer.html) in
49
+ * `GRAY8` format. If needed, pixel values are rescaled given `max` value
50
+ * defined in PGM header (MUST be <= 0xff).
48
51
  *
49
52
  * @remarks
50
53
  * Reference: http://netpbm.sourceforge.net/doc/pbm.html
@@ -58,8 +61,10 @@ export declare const readPBM: (src: Uint8Array, i: number, width: number, height
58
61
  export declare const readPGM8: (src: Uint8Array, i: number, width: number, height: number, max?: number) => import("@thi.ng/pixel/int").IntBuffer;
59
62
  /**
60
63
  * Reads pixels from given 16bit PGM file byte buffer, starting at index `i` and
61
- * returns {@link @thi.ng/pixel#IntBuffer} in `GRAY16` format. Pixel values
62
- * are rescaled given `max` value defined in PGM header (MUST be <= 0xffff).
64
+ * returns
65
+ * [`IntBuffer`](https://docs.thi.ng/umbrella/pixel/classes/IntBuffer.html) in
66
+ * `GRAY16` format. Pixel values are rescaled given `max` value defined in PGM
67
+ * header (MUST be <= 0xffff).
63
68
  *
64
69
  * @remarks
65
70
  * Reference: http://netpbm.sourceforge.net/doc/pgm.html
@@ -73,9 +78,10 @@ export declare const readPGM8: (src: Uint8Array, i: number, width: number, heigh
73
78
  export declare const readPGM16: (src: Uint8Array, i: number, width: number, height: number, max?: number) => import("@thi.ng/pixel/int").IntBuffer;
74
79
  /**
75
80
  * Reads pixels from given 24bit PPM file byte buffer, starting at index `i` and
76
- * returns {@link @thi.ng/pixel#IntBuffer} in `RGB888` format. Color channel
77
- * values are rescaled given `max` value defined in PGM header (MUST be <=
78
- * 0xff).
81
+ * returns
82
+ * [`IntBuffer`](https://docs.thi.ng/umbrella/pixel/classes/IntBuffer.html) in
83
+ * `RGB888` format. Color channel values are rescaled given `max` value defined
84
+ * in PGM header (MUST be <= 0xff).
79
85
  *
80
86
  * @remarks
81
87
  * Reference: http://netpbm.sourceforge.net/doc/pgm.html
package/read.js CHANGED
@@ -62,7 +62,8 @@ export const parseHeader = (src) => {
62
62
  };
63
63
  /**
64
64
  * Takes a PBM/PGM/PPM file as byte array and parses it into a
65
- * {@link @thi.ng/pixel#IntBuffer} of corresponding format.
65
+ * [`IntBuffer`](https://docs.thi.ng/umbrella/pixel/classes/IntBuffer.html) of
66
+ * corresponding format.
66
67
  *
67
68
  * @remarks
68
69
  * Depending on header information, the following rules apply:
@@ -94,8 +95,9 @@ export const read = (src) => {
94
95
  };
95
96
  /**
96
97
  * Reads pixels from given 1bit PBM file byte buffer, starting at index `i` and
97
- * returns {@link @thi.ng/pixel#IntBuffer} in `GRAY8` format (due to current
98
- * lack of true 1bit format).
98
+ * returns
99
+ * [`IntBuffer`](https://docs.thi.ng/umbrella/pixel/classes/IntBuffer.html) in
100
+ * `GRAY8` format (due to current lack of true 1bit format).
99
101
  *
100
102
  * @param src -
101
103
  * @param i -
@@ -117,9 +119,10 @@ export const readPBM = (src, i, width, height) => {
117
119
  };
118
120
  /**
119
121
  * Reads pixels from given 8bit PGM file byte buffer, starting at index `i` and
120
- * returns {@link @thi.ng/pixel#IntBuffer} in `GRAY8` format. If needed,
121
- * pixel values are rescaled given `max` value defined in PGM header (MUST
122
- * be <= 0xff).
122
+ * returns
123
+ * [`IntBuffer`](https://docs.thi.ng/umbrella/pixel/classes/IntBuffer.html) in
124
+ * `GRAY8` format. If needed, pixel values are rescaled given `max` value
125
+ * defined in PGM header (MUST be <= 0xff).
123
126
  *
124
127
  * @remarks
125
128
  * Reference: http://netpbm.sourceforge.net/doc/pbm.html
@@ -146,8 +149,10 @@ export const readPGM8 = (src, i, width, height, max = 0xff) => {
146
149
  };
147
150
  /**
148
151
  * Reads pixels from given 16bit PGM file byte buffer, starting at index `i` and
149
- * returns {@link @thi.ng/pixel#IntBuffer} in `GRAY16` format. Pixel values
150
- * are rescaled given `max` value defined in PGM header (MUST be <= 0xffff).
152
+ * returns
153
+ * [`IntBuffer`](https://docs.thi.ng/umbrella/pixel/classes/IntBuffer.html) in
154
+ * `GRAY16` format. Pixel values are rescaled given `max` value defined in PGM
155
+ * header (MUST be <= 0xffff).
151
156
  *
152
157
  * @remarks
153
158
  * Reference: http://netpbm.sourceforge.net/doc/pgm.html
@@ -169,9 +174,10 @@ export const readPGM16 = (src, i, width, height, max = 0xffff) => {
169
174
  };
170
175
  /**
171
176
  * Reads pixels from given 24bit PPM file byte buffer, starting at index `i` and
172
- * returns {@link @thi.ng/pixel#IntBuffer} in `RGB888` format. Color channel
173
- * values are rescaled given `max` value defined in PGM header (MUST be <=
174
- * 0xff).
177
+ * returns
178
+ * [`IntBuffer`](https://docs.thi.ng/umbrella/pixel/classes/IntBuffer.html) in
179
+ * `RGB888` format. Color channel values are rescaled given `max` value defined
180
+ * in PGM header (MUST be <= 0xff).
175
181
  *
176
182
  * @remarks
177
183
  * Reference: http://netpbm.sourceforge.net/doc/pgm.html