@richardmcquiston01/core-image 0.1.0 → 0.1.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 +28 -0
- package/package.json +15 -1
package/README.md
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
1
|
# @richardmcquiston01/core-image
|
|
2
2
|
|
|
3
|
+
Image processing core for laser, CNC and other maker-machine workflows: a filter registry (dithering, tone, edge/morphology, transforms, test grids), image I/O helpers, and grayscale heightmap-to-STL conversion.
|
|
4
|
+
|
|
3
5
|
Part of [maker-image-tools](https://github.com/RichardMcQuiston01/maker-image-tools).
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm i @richardmcquiston01/core-image
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import {
|
|
17
|
+
createFilterRegistry,
|
|
18
|
+
imageToHeightmapStl,
|
|
19
|
+
loadImageData,
|
|
20
|
+
} from "@richardmcquiston01/core-image";
|
|
21
|
+
|
|
22
|
+
const image: ImageData = await loadImageData(blob);
|
|
23
|
+
const registry = createFilterRegistry();
|
|
24
|
+
const stl: string = imageToHeightmapStl(image);
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Requires an environment with `ImageData` (browser, or a polyfill in Node). ESM only.
|
|
28
|
+
|
|
29
|
+
## License
|
|
30
|
+
|
|
31
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,8 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@richardmcquiston01/core-image",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Image processing core (filters, heightmaps, pixel I/O) for laser/CNC/maker workflows",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"image-processing",
|
|
7
|
+
"dithering",
|
|
8
|
+
"heightmap",
|
|
9
|
+
"laser",
|
|
10
|
+
"cnc",
|
|
11
|
+
"engraving",
|
|
12
|
+
"maker",
|
|
13
|
+
"typescript"
|
|
14
|
+
],
|
|
5
15
|
"license": "MIT",
|
|
16
|
+
"homepage": "https://github.com/RichardMcQuiston01/maker-image-tools#readme",
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/RichardMcQuiston01/maker-image-tools/issues"
|
|
19
|
+
},
|
|
6
20
|
"type": "module",
|
|
7
21
|
"repository": {
|
|
8
22
|
"type": "git",
|