@rosepetal/node-red-contrib-image-tools 1.6.4 → 1.7.0

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.
Files changed (46) hide show
  1. package/.claude/rules/node-implementation-template.md +1 -1
  2. package/README.md +2 -0
  3. package/node-red-contrib-image-tools/lib/bmp-decode.js +18 -68
  4. package/node-red-contrib-image-tools/lib/cpp-bridge.js +202 -104
  5. package/node-red-contrib-image-tools/lib/node-utils.js +78 -78
  6. package/node-red-contrib-image-tools/nodes/io/folder-in.js +98 -46
  7. package/node-red-contrib-image-tools/nodes/io/image-in.js +3 -4
  8. package/node-red-contrib-image-tools/nodes/io/image-out.js +93 -146
  9. package/node-red-contrib-image-tools/nodes/specialized/cropBB.js +3 -3
  10. package/node-red-contrib-image-tools/nodes/specialized/heat-diff.js +3 -3
  11. package/node-red-contrib-image-tools/nodes/specialized/image-align.js +3 -3
  12. package/node-red-contrib-image-tools/nodes/transform/color-convert.js +3 -3
  13. package/node-red-contrib-image-tools/nodes/transform/crop.js +3 -3
  14. package/node-red-contrib-image-tools/nodes/transform/filter.js +3 -3
  15. package/node-red-contrib-image-tools/nodes/transform/padding.js +3 -3
  16. package/node-red-contrib-image-tools/nodes/transform/resize.js +3 -3
  17. package/node-red-contrib-image-tools/nodes/transform/rotate.js +3 -3
  18. package/npm/darwin-arm64/package.json +1 -1
  19. package/npm/darwin-x64/package.json +1 -1
  20. package/npm/linux-arm64/package.json +1 -1
  21. package/npm/linux-x64/package.json +1 -1
  22. package/npm/linuxmusl-x64/package.json +1 -1
  23. package/npm/win32-x64/package.json +1 -1
  24. package/package.json +6 -6
  25. package/rosepetal-image-engine/binding.gyp +2 -1
  26. package/rosepetal-image-engine/src/add-bbs.cpp +123 -123
  27. package/rosepetal-image-engine/src/add-mask.cpp +30 -15
  28. package/rosepetal-image-engine/src/add-masks.cpp +145 -102
  29. package/rosepetal-image-engine/src/advanced-mosaic.cpp +200 -129
  30. package/rosepetal-image-engine/src/blend.cpp +34 -20
  31. package/rosepetal-image-engine/src/codec.cpp +157 -0
  32. package/rosepetal-image-engine/src/color-convert.cpp +22 -19
  33. package/rosepetal-image-engine/src/concat.cpp +38 -43
  34. package/rosepetal-image-engine/src/crop.cpp +23 -26
  35. package/rosepetal-image-engine/src/draw.cpp +33 -10
  36. package/rosepetal-image-engine/src/filter.cpp +22 -26
  37. package/rosepetal-image-engine/src/heat-diff.cpp +31 -8
  38. package/rosepetal-image-engine/src/image-align.cpp +36 -32
  39. package/rosepetal-image-engine/src/main.cpp +4 -0
  40. package/rosepetal-image-engine/src/mosaic.cpp +31 -40
  41. package/rosepetal-image-engine/src/padding.cpp +30 -29
  42. package/rosepetal-image-engine/src/resize.cpp +20 -25
  43. package/rosepetal-image-engine/src/rotate.cpp +22 -23
  44. package/rosepetal-image-engine/src/utils.h +243 -144
  45. package/scripts/dual-register.js +32 -25
  46. package/scripts/sync-version.js +58 -41
@@ -12,30 +12,84 @@ try {
12
12
  }
13
13
  const fs = require('fs').promises;
14
14
  const path = require('path');
15
+ const Cpp = require('../../lib/cpp-bridge.js');
15
16
 
16
17
  module.exports = function(RED) {
17
18
  const NodeUtils = require('../../lib/node-utils.js')(RED);
18
19
 
20
+ // Per-folder cache: file name → mtimeMs. Our own writes and unlinks keep it
21
+ // exact; a full readdir is only repeated every DIR_RESYNC_MS to pick up
22
+ // changes made by other processes.
19
23
  const dirCache = new Map();
24
+ const dirSyncedAt = new Map();
25
+ const dirScanInFlight = new Map();
26
+ const DIR_RESYNC_MS = 5000;
27
+ const STAT_CONCURRENCY = 32; // keep the libuv thread pool free for image work
28
+
29
+ // Concurrency-limited async map (results keep input order).
30
+ async function mapLimit(items, limit, fn) {
31
+ const results = new Array(items.length);
32
+ let next = 0;
33
+ async function worker() {
34
+ while (next < items.length) {
35
+ const i = next++;
36
+ results[i] = await fn(items[i], i);
37
+ }
38
+ }
39
+ await Promise.all(Array.from({ length: Math.min(limit, items.length) }, worker));
40
+ return results;
41
+ }
42
+
43
+ async function statNames(folderPath, names) {
44
+ const stats = await mapLimit(names, STAT_CONCURRENCY, async (name) => {
45
+ try {
46
+ const st = await fs.stat(path.join(folderPath, name));
47
+ return { name, mtimeMs: st.mtimeMs };
48
+ } catch {
49
+ return null; // vanished between readdir and stat
50
+ }
51
+ });
52
+ return stats.filter(Boolean);
53
+ }
54
+
55
+ // Reconciles the cache with the directory listing (adds unknown files with
56
+ // their mtime, drops files that no longer exist).
57
+ async function syncDirCache(folderPath, map) {
58
+ const entries = await fs.readdir(folderPath, { withFileTypes: true });
59
+ const diskFiles = new Set();
60
+ for (const e of entries) {
61
+ if (e.isFile()) diskFiles.add(e.name);
62
+ }
63
+ for (const name of map.keys()) {
64
+ if (!diskFiles.has(name)) map.delete(name);
65
+ }
66
+ const unknown = [];
67
+ for (const name of diskFiles) {
68
+ if (!map.has(name)) unknown.push(name);
69
+ }
70
+ if (unknown.length > 0) {
71
+ for (const { name, mtimeMs } of await statNames(folderPath, unknown)) map.set(name, mtimeMs);
72
+ }
73
+ dirSyncedAt.set(folderPath, Date.now());
74
+ }
20
75
 
21
76
  async function getCachedDir(folderPath) {
22
77
  if (dirCache.has(folderPath)) return dirCache.get(folderPath);
23
- const map = new Map();
24
- try {
25
- const entries = await fs.readdir(folderPath, { withFileTypes: true });
26
- const files = entries.filter(e => e.isFile());
27
- const stats = await Promise.all(
28
- files.map(async (f) => {
29
- const st = await fs.stat(path.join(folderPath, f.name));
30
- return { name: f.name, mtimeMs: st.mtimeMs };
31
- })
32
- );
33
- for (const { name, mtimeMs } of stats) map.set(name, mtimeMs);
34
- } catch {
35
- // folder doesn't exist yet — empty cache is fine
36
- }
37
- dirCache.set(folderPath, map);
38
- return map;
78
+ if (dirScanInFlight.has(folderPath)) return dirScanInFlight.get(folderPath);
79
+ const scan = (async () => {
80
+ const map = new Map();
81
+ try {
82
+ await syncDirCache(folderPath, map);
83
+ } catch {
84
+ // folder doesn't exist yet — empty cache is fine
85
+ dirSyncedAt.set(folderPath, Date.now());
86
+ }
87
+ dirCache.set(folderPath, map);
88
+ dirScanInFlight.delete(folderPath);
89
+ return map;
90
+ })();
91
+ dirScanInFlight.set(folderPath, scan);
92
+ return scan;
39
93
  }
40
94
 
41
95
  function ImageOutNode(config) {
@@ -100,32 +154,18 @@ module.exports = function(RED) {
100
154
  if (!validated) throw new Error("Invalid image structure");
101
155
 
102
156
  const colorSpace = validated.colorSpace;
103
- const channels = validated.channels;
104
- let data = validated.data;
105
157
 
106
- // BMP: encode raw pixels directly (no Sharp)
158
+ // BMP: encoded by the native engine on the thread pool (Sharp cannot write BMP)
107
159
  if (format === 'bmp') {
108
- let nativeData = data;
109
- if (colorSpace === 'RGB' || colorSpace === 'RGBA') {
110
- nativeData = Buffer.from(data);
111
- for (let i = 0; i < nativeData.length; i += channels) {
112
- const t = nativeData[i]; nativeData[i] = nativeData[i + 2]; nativeData[i + 2] = t;
113
- }
114
- }
115
- const buf = Buffer.isBuffer(nativeData) ? nativeData : Buffer.from(nativeData);
116
- return encodeBmpRaw(buf, validated.width, validated.height, channels);
160
+ const { image: bmp } = await Cpp.encode(validated, 'bmp');
161
+ return bmp;
117
162
  }
118
163
 
119
- // BGR/BGRA → RGB/RGBA for Sharp
120
- if (colorSpace === 'BGR' || colorSpace === 'BGRA') {
121
- data = Buffer.from(data);
122
- for (let i = 0; i < data.length; i += channels) {
123
- const t = data[i]; data[i] = data[i + 2]; data[i + 2] = t;
124
- }
125
- }
164
+ // BGR/BGRA → RGB/RGBA for Sharp (native, off the event loop)
165
+ const rgb = await NodeUtils.toSharpRaw(validated);
126
166
 
127
- const inst = sharp(data, {
128
- raw: { width: validated.width, height: validated.height, channels }
167
+ const inst = sharp(rgb.data, {
168
+ raw: { width: rgb.width, height: rgb.height, channels: rgb.channels }
129
169
  });
130
170
  if (colorSpace === 'GRAY') inst.toColourspace('b-w');
131
171
 
@@ -343,7 +383,7 @@ module.exports = function(RED) {
343
383
 
344
384
  if (maxImages > 0) {
345
385
  try {
346
- await enforceMaxImages(folderPath, maxImages, dirCache.get(folderPath));
386
+ await enforceMaxImages(folderPath, maxImages);
347
387
  } catch (policyErr) {
348
388
  node.warn(`Max images enforcement failed: ${policyErr.message}`);
349
389
  }
@@ -508,7 +548,7 @@ module.exports = function(RED) {
508
548
 
509
549
  if (maxImages > 0) {
510
550
  try {
511
- await enforceMaxImages(folderPath, maxImages, dirCache.get(folderPath));
551
+ await enforceMaxImages(folderPath, maxImages);
512
552
  } catch (policyErr) {
513
553
  node.warn(`Max images enforcement failed: ${policyErr.message}`);
514
554
  }
@@ -587,124 +627,31 @@ module.exports = function(RED) {
587
627
  }
588
628
  }
589
629
 
590
- async function enforceMaxImages(folderPath, maxCount, cachedMap) {
630
+ async function enforceMaxImages(folderPath, maxCount) {
591
631
  if (maxCount <= 0) return;
592
632
 
593
- const entries = await fs.readdir(folderPath, { withFileTypes: true });
594
- const diskFiles = new Set();
595
- for (const e of entries) {
596
- if (e.isFile()) diskFiles.add(e.name);
597
- }
598
- if (diskFiles.size <= maxCount) {
599
- if (cachedMap) {
600
- for (const name of cachedMap.keys()) {
601
- if (!diskFiles.has(name)) cachedMap.delete(name);
602
- }
603
- }
604
- return;
633
+ // The cache is authoritative for our own writes; re-list the directory
634
+ // only every DIR_RESYNC_MS (instead of on every message) to catch files
635
+ // added or removed by other processes.
636
+ const cachedMap = await getCachedDir(folderPath);
637
+ if (Date.now() - (dirSyncedAt.get(folderPath) || 0) >= DIR_RESYNC_MS) {
638
+ await syncDirCache(folderPath, cachedMap);
605
639
  }
606
640
 
607
- if (cachedMap) {
608
- for (const name of cachedMap.keys()) {
609
- if (!diskFiles.has(name)) cachedMap.delete(name);
610
- }
611
- const unknown = [];
612
- for (const name of diskFiles) {
613
- if (!cachedMap.has(name)) unknown.push(name);
614
- }
615
- if (unknown.length > 0) {
616
- const stats = await Promise.all(
617
- unknown.map(async (name) => {
618
- const st = await fs.stat(path.join(folderPath, name));
619
- return { name, mtimeMs: st.mtimeMs };
620
- })
621
- );
622
- for (const { name, mtimeMs } of stats) cachedMap.set(name, mtimeMs);
623
- }
624
- }
641
+ if (cachedMap.size <= maxCount) return;
625
642
 
626
- let sorted;
627
- if (cachedMap && cachedMap.size > 0) {
628
- sorted = Array.from(cachedMap.entries()).map(([name, mtimeMs]) => ({ name, mtimeMs }));
629
- } else {
630
- sorted = await Promise.all(
631
- Array.from(diskFiles).map(async (name) => {
632
- const st = await fs.stat(path.join(folderPath, name));
633
- return { name, mtimeMs: st.mtimeMs };
634
- })
635
- );
636
- }
643
+ const sorted = Array.from(cachedMap, ([name, mtimeMs]) => ({ name, mtimeMs }));
637
644
  sorted.sort((a, b) => a.mtimeMs - b.mtimeMs);
638
645
 
639
- const toRemove = sorted.length - maxCount;
640
- for (let i = 0; i < toRemove; i++) {
646
+ const toRemove = sorted.slice(0, sorted.length - maxCount);
647
+ await mapLimit(toRemove, STAT_CONCURRENCY, async ({ name }) => {
641
648
  try {
642
- await fs.unlink(path.join(folderPath, sorted[i].name));
649
+ await fs.unlink(path.join(folderPath, name));
643
650
  } catch (err) {
644
651
  if (err.code !== 'ENOENT') throw err;
645
652
  }
646
- cachedMap?.delete(sorted[i].name);
647
- }
648
- }
649
-
650
- function encodeBmpRaw(pixelData, width, height, channels) {
651
- const bitsPerPixel = channels * 8;
652
- const rowBytes = width * channels;
653
- const rowPadding = (4 - (rowBytes % 4)) % 4;
654
- const paddedRowSize = rowBytes + rowPadding;
655
-
656
- const hasPalette = channels === 1;
657
- const paletteSize = hasPalette ? 256 * 4 : 0;
658
- const headerSize = 14;
659
- const infoHeaderSize = 40;
660
- const pixelDataOffset = headerSize + infoHeaderSize + paletteSize;
661
- const pixelDataSize = paddedRowSize * height;
662
- const fileSize = pixelDataOffset + pixelDataSize;
663
-
664
- const buf = Buffer.alloc(fileSize);
665
-
666
- // File header
667
- buf.write('BM', 0);
668
- buf.writeUInt32LE(fileSize, 2);
669
- buf.writeUInt32LE(0, 6); // reserved
670
- buf.writeUInt32LE(pixelDataOffset, 10);
671
-
672
- // Info header (BITMAPINFOHEADER)
673
- buf.writeUInt32LE(infoHeaderSize, 14);
674
- buf.writeInt32LE(width, 18);
675
- buf.writeInt32LE(height, 22); // positive = bottom-up
676
- buf.writeUInt16LE(1, 26); // planes
677
- buf.writeUInt16LE(bitsPerPixel, 28);
678
- buf.writeUInt32LE(0, 30); // compression (BI_RGB)
679
- buf.writeUInt32LE(pixelDataSize, 34);
680
- buf.writeInt32LE(2835, 38); // X pixels per meter (~72 DPI)
681
- buf.writeInt32LE(2835, 42); // Y pixels per meter
682
- buf.writeUInt32LE(hasPalette ? 256 : 0, 46);
683
- buf.writeUInt32LE(0, 50); // important colors
684
-
685
- // Grayscale palette
686
- if (hasPalette) {
687
- let offset = headerSize + infoHeaderSize;
688
- for (let i = 0; i < 256; i++) {
689
- buf[offset++] = i; // B
690
- buf[offset++] = i; // G
691
- buf[offset++] = i; // R
692
- buf[offset++] = 0; // reserved
693
- }
694
- }
695
-
696
- // Pixel data (bottom-up row order)
697
- const padBytes = Buffer.alloc(rowPadding);
698
- for (let y = height - 1; y >= 0; y--) {
699
- const srcOffset = y * rowBytes;
700
- const dstOffset = pixelDataOffset + (height - 1 - y) * paddedRowSize;
701
- pixelData.copy(buf, dstOffset, srcOffset, srcOffset + rowBytes);
702
- if (rowPadding > 0) {
703
- padBytes.copy(buf, dstOffset + rowBytes);
704
- }
705
- }
706
-
707
- return buf;
653
+ cachedMap.delete(name);
654
+ });
708
655
  }
709
656
 
710
657
  // Handle cleanup
@@ -190,9 +190,9 @@ module.exports = function (RED) {
190
190
  });
191
191
 
192
192
  if (useSharpWebp) {
193
- for (let i = 0; i < allCrops.length; i++) {
194
- allCrops[i] = await NodeUtils.encodeWebpAdvanced(allCrops[i], config);
195
- }
193
+ // Encode all images concurrently (Sharp runs on the libuv thread pool)
194
+ const webps = await Promise.all(allCrops.map((img) => NodeUtils.encodeWebpAdvanced(img, config)));
195
+ webps.forEach((webp, i) => { allCrops[i] = webp; });
196
196
  }
197
197
 
198
198
  /* Set output */
@@ -174,9 +174,9 @@ module.exports = function (RED) {
174
174
  const images = imageEnabled ? results.map(r => r.image) : [];
175
175
 
176
176
  if (useSharpWebp) {
177
- for (let i = 0; i < images.length; i++) {
178
- images[i] = await NodeUtils.encodeWebpAdvanced(images[i], config);
179
- }
177
+ // Encode all images concurrently (Sharp runs on the libuv thread pool)
178
+ const webps = await Promise.all(images.map((img) => NodeUtils.encodeWebpAdvanced(img, config)));
179
+ webps.forEach((webp, i) => { images[i] = webp; });
180
180
  }
181
181
 
182
182
  /* Write result — array in, array out; stats-only leaves the output path untouched */
@@ -389,9 +389,9 @@ module.exports = function (RED) {
389
389
  const images = results.map(r => r.image);
390
390
 
391
391
  if (useSharpWebp) {
392
- for (let i = 0; i < images.length; i++) {
393
- images[i] = await NodeUtils.encodeWebpAdvanced(images[i], config);
394
- }
392
+ // Encode all images concurrently (Sharp runs on the libuv thread pool)
393
+ const webps = await Promise.all(images.map((img) => NodeUtils.encodeWebpAdvanced(img, config)));
394
+ webps.forEach((webp, i) => { images[i] = webp; });
395
395
  }
396
396
 
397
397
  /* ▸ Status: standardized success formatting ----------------------- */
@@ -83,9 +83,9 @@ module.exports = function (RED) {
83
83
  }, { totalConvertMs: 0, totalTaskMs: 0, encodeMs: 0, images: [] });
84
84
 
85
85
  if (useSharpWebp) {
86
- for (let i = 0; i < images.length; i++) {
87
- images[i] = await NodeUtils.encodeWebpAdvanced(images[i], config);
88
- }
86
+ // Encode all images concurrently (Sharp runs on the libuv thread pool)
87
+ const webps = await Promise.all(images.map((img) => NodeUtils.encodeWebpAdvanced(img, config)));
88
+ webps.forEach((webp, i) => { images[i] = webp; });
89
89
  }
90
90
 
91
91
  const out = Array.isArray(originalPayload) ? images : images[0];
@@ -95,9 +95,9 @@ module.exports = function (RED) {
95
95
  }, { totalConvertMs: 0, totalTaskMs: 0, totalEncodeMs: 0, images: [] });
96
96
 
97
97
  if (useSharpWebp) {
98
- for (let i = 0; i < images.length; i++) {
99
- images[i] = await NodeUtils.encodeWebpAdvanced(images[i], config);
100
- }
98
+ // Encode all images concurrently (Sharp runs on the libuv thread pool)
99
+ const webps = await Promise.all(images.map((img) => NodeUtils.encodeWebpAdvanced(img, config)));
100
+ webps.forEach((webp, i) => { images[i] = webp; });
101
101
  }
102
102
 
103
103
  /* salida */
@@ -148,9 +148,9 @@ module.exports = function (RED) {
148
148
  );
149
149
 
150
150
  if (useSharpWebp) {
151
- for (let i = 0; i < images.length; i++) {
152
- images[i] = await NodeUtils.encodeWebpAdvanced(images[i], config);
153
- }
151
+ // Encode all images concurrently (Sharp runs on the libuv thread pool)
152
+ const webps = await Promise.all(images.map((img) => NodeUtils.encodeWebpAdvanced(img, config)));
153
+ webps.forEach((webp, i) => { images[i] = webp; });
154
154
  }
155
155
 
156
156
  // Prepare output
@@ -93,9 +93,9 @@ module.exports = function (RED) {
93
93
  });
94
94
 
95
95
  if (useSharpWebp) {
96
- for (let i = 0; i < outImgs.length; i++) {
97
- outImgs[i] = await NodeUtils.encodeWebpAdvanced(outImgs[i], cfg);
98
- }
96
+ // Encode all images concurrently (Sharp runs on the libuv thread pool)
97
+ const webps = await Promise.all(outImgs.map((img) => NodeUtils.encodeWebpAdvanced(img, cfg)));
98
+ webps.forEach((webp, i) => { outImgs[i] = webp; });
99
99
  }
100
100
 
101
101
  NodeUtils.setOutputValue(node, msg, outPath, outputPathType, Array.isArray(originalPayload) ? outImgs : outImgs[0]);
@@ -116,9 +116,9 @@ module.exports = function (RED) {
116
116
  );
117
117
 
118
118
  if (useSharpWebp) {
119
- for (let i = 0; i < images.length; i++) {
120
- images[i] = await NodeUtils.encodeWebpAdvanced(images[i], config);
121
- }
119
+ // Encode all images concurrently (Sharp runs on the libuv thread pool)
120
+ const webps = await Promise.all(images.map((img) => NodeUtils.encodeWebpAdvanced(img, config)));
121
+ webps.forEach((webp, i) => { images[i] = webp; });
122
122
  }
123
123
 
124
124
  const out = Array.isArray(originalPayload) ? images : images[0];
@@ -87,9 +87,9 @@ module.exports = function (RED) {
87
87
  }, { totalConvertMs: 0, totalTaskMs: 0, encodeMs: 0, images: [] });
88
88
 
89
89
  if (useSharpWebp) {
90
- for (let i = 0; i < images.length; i++) {
91
- images[i] = await NodeUtils.encodeWebpAdvanced(images[i], config);
92
- }
90
+ // Encode all images concurrently (Sharp runs on the libuv thread pool)
91
+ const webps = await Promise.all(images.map((img) => NodeUtils.encodeWebpAdvanced(img, config)));
92
+ webps.forEach((webp, i) => { images[i] = webp; });
93
93
  }
94
94
 
95
95
  const out = Array.isArray(originalPayload) ? images : images[0];
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rosepetal/node-red-contrib-image-tools-darwin-arm64",
3
- "version": "1.6.4",
3
+ "version": "1.7.0",
4
4
  "description": "Prebuilt native binary for macOS ARM64 (Apple Silicon)",
5
5
  "os": ["darwin"],
6
6
  "cpu": ["arm64"],
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rosepetal/node-red-contrib-image-tools-darwin-x64",
3
- "version": "1.6.4",
3
+ "version": "1.7.0",
4
4
  "description": "Prebuilt native binary for macOS x64 (Intel)",
5
5
  "os": ["darwin"],
6
6
  "cpu": ["x64"],
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rosepetal/node-red-contrib-image-tools-linux-arm64",
3
- "version": "1.6.4",
3
+ "version": "1.7.0",
4
4
  "description": "Prebuilt native binary for Linux ARM64 (glibc)",
5
5
  "os": ["linux"],
6
6
  "cpu": ["arm64"],
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rosepetal/node-red-contrib-image-tools-linux-x64",
3
- "version": "1.6.4",
3
+ "version": "1.7.0",
4
4
  "description": "Prebuilt native binary for Linux x64 (glibc)",
5
5
  "os": ["linux"],
6
6
  "cpu": ["x64"],
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rosepetal/node-red-contrib-image-tools-linuxmusl-x64",
3
- "version": "1.6.4",
3
+ "version": "1.7.0",
4
4
  "description": "Prebuilt native binary for Linux x64 (musl/Alpine)",
5
5
  "os": ["linux"],
6
6
  "cpu": ["x64"],
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rosepetal/rosepetal-engine-win32-x64",
3
- "version": "1.6.4",
3
+ "version": "1.7.0",
4
4
  "description": "Prebuilt rosepetal-image-engine binary for Windows x64",
5
5
  "os": ["win32"],
6
6
  "cpu": ["x64"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rosepetal/node-red-contrib-image-tools",
3
- "version": "1.6.4",
3
+ "version": "1.7.0",
4
4
  "description": "Node-RED Image Processing Toolkit",
5
5
  "main": "install.sh",
6
6
  "directories": {
@@ -36,11 +36,11 @@
36
36
  "sharp": "^0.34.2"
37
37
  },
38
38
  "optionalDependencies": {
39
- "@rosepetal/node-red-contrib-image-tools-linux-x64": "1.6.4",
40
- "@rosepetal/node-red-contrib-image-tools-linux-arm64": "1.6.4",
41
- "@rosepetal/node-red-contrib-image-tools-linuxmusl-x64": "1.6.4",
42
- "@rosepetal/node-red-contrib-image-tools-darwin-x64": "1.6.4",
43
- "@rosepetal/node-red-contrib-image-tools-darwin-arm64": "1.6.4"
39
+ "@rosepetal/node-red-contrib-image-tools-linux-x64": "1.7.0",
40
+ "@rosepetal/node-red-contrib-image-tools-linux-arm64": "1.7.0",
41
+ "@rosepetal/node-red-contrib-image-tools-linuxmusl-x64": "1.7.0",
42
+ "@rosepetal/node-red-contrib-image-tools-darwin-x64": "1.7.0",
43
+ "@rosepetal/node-red-contrib-image-tools-darwin-arm64": "1.7.0"
44
44
  },
45
45
  "node-red": {
46
46
  "version": ">=1.0.0",
@@ -23,7 +23,8 @@
23
23
  "src/image-align.cpp",
24
24
  "src/draw.cpp",
25
25
  "src/color-convert.cpp",
26
- "src/heat-diff.cpp"
26
+ "src/heat-diff.cpp",
27
+ "src/codec.cpp"
27
28
  ],
28
29
  "defines": [
29
30
  "NAPI_CPP_EXCEPTIONS"