@rosepetal/node-red-contrib-image-tools 1.3.1 → 1.4.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.
@@ -4,7 +4,8 @@
4
4
  color: '#A6C8A6',
5
5
  defaults: {
6
6
  name: { value: "" },
7
- folderPath: { value: "", required: true },
7
+ mode: { value: "single" },
8
+ folderPath: { value: "" },
8
9
  folderPathType: { value: "str" },
9
10
  filenamePrefix: { value: "" },
10
11
  filenamePrefixType: { value: "str" },
@@ -12,9 +13,16 @@
12
13
  filenameFullType: { value: "str" },
13
14
  inputPath: { value: "payload" },
14
15
  inputPathType: { value: "msg" },
16
+ saveConfig: { value: "payload" },
17
+ saveConfigType: { value: "msg" },
18
+ imageField: { value: "bitmap" },
19
+ filenameField: { value: "filename" },
20
+ filenameFieldType: { value: "item" },
21
+ outputDirField: { value: "outputDir" },
22
+ outputDirFieldType: { value: "item" },
15
23
  outputFormat: { value: "jpg" },
16
24
  outputQuality: { value: 90 },
17
- pngOptimize: { value: false },
25
+ pngCompression: { value: 8 },
18
26
  webpLossless: { value: false },
19
27
  webpEffort: { value: "" },
20
28
  webpSmartSubsample: { value: false },
@@ -22,7 +30,6 @@
22
30
  maxImages: { value: "" },
23
31
  maxImagesType: { value: "num" },
24
32
  active: { value: true },
25
- // Debug configuration
26
33
  debugEnabled: { value: false },
27
34
  debugWidth: { value: 200 },
28
35
  debugWidthType: { value: "num" }
@@ -77,20 +84,40 @@
77
84
  }
78
85
  },
79
86
  oneditprepare: function() {
87
+ // Mode toggle
88
+ function toggleMode() {
89
+ var isMultiple = $('#node-input-mode').val() === 'multiple';
90
+ if (isMultiple) {
91
+ $('.imageout-single-mode').hide();
92
+ $('.imageout-multiple-mode').show();
93
+ } else {
94
+ $('.imageout-single-mode').show();
95
+ $('.imageout-multiple-mode').hide();
96
+ }
97
+ }
98
+ $('#node-input-mode').change(toggleMode);
99
+ toggleMode();
100
+
101
+ // Item field custom type for typedInputs
102
+ var itemFieldType = {
103
+ value: 'item',
104
+ label: 'Item field',
105
+ icon: 'red/images/typedInput/json.svg'
106
+ };
107
+
80
108
  // Initialize TypedInput for folder path
81
109
  $("#node-input-folderPath").typedInput({
82
110
  default: 'str',
83
111
  types: ['str', 'msg', 'flow', 'global'],
84
112
  typeField: "#node-input-folderPathType"
85
113
  });
86
-
87
- const jsonataTypeOption = {
114
+
115
+ var jsonataTypeOption = {
88
116
  value: 'jsonata',
89
117
  label: 'JSONata',
90
118
  icon: 'red/images/typedInput/expr.svg'
91
119
  };
92
-
93
- const nameTypes = ['str', 'msg', 'flow', 'global', jsonataTypeOption];
120
+ var nameTypes = ['str', 'msg', 'flow', 'global', jsonataTypeOption];
94
121
 
95
122
  // Initialize TypedInput for filename prefix
96
123
  $("#node-input-filenamePrefix").typedInput({
@@ -105,7 +132,7 @@
105
132
  types: nameTypes,
106
133
  typeField: "#node-input-filenameFullType"
107
134
  });
108
-
135
+
109
136
  // Initialize TypedInput for input path
110
137
  $("#node-input-inputPath").typedInput({
111
138
  default: 'msg',
@@ -113,63 +140,82 @@
113
140
  typeField: "#node-input-inputPathType"
114
141
  });
115
142
 
143
+ // Multiple mode TypedInputs
144
+ $("#node-input-saveConfig").typedInput({
145
+ default: 'msg',
146
+ types: ['msg', 'flow', 'global'],
147
+ typeField: "#node-input-saveConfigType"
148
+ });
149
+
150
+ $("#node-input-filenameField").typedInput({
151
+ default: 'item',
152
+ types: [itemFieldType, 'str', 'msg', 'flow', 'global'],
153
+ typeField: "#node-input-filenameFieldType"
154
+ });
155
+
156
+ $("#node-input-outputDirField").typedInput({
157
+ default: 'item',
158
+ types: [itemFieldType, 'str', 'msg', 'flow', 'global'],
159
+ typeField: "#node-input-outputDirFieldType"
160
+ });
161
+
116
162
  // Initialize TypedInput for maximum images
117
163
  $("#node-input-maxImages").typedInput({
118
164
  default: 'num',
119
165
  types: ['num', 'msg', 'flow', 'global'],
120
166
  typeField: "#node-input-maxImagesType"
121
167
  });
122
-
168
+
123
169
  // Initialize debug width TypedInput
124
170
  $("#node-input-debugWidth").typedInput({
125
171
  default: 'num',
126
172
  types: ['num', 'msg', 'flow', 'global'],
127
173
  typeField: "#node-input-debugWidthType"
128
174
  });
129
-
175
+
130
176
  // Show/hide quality row based on format
131
177
  function updateQualityVisibility() {
132
- const format = $('#node-input-outputFormat').val();
133
- const qualityRow = $('#quality-row');
134
- const pngOptimizeRow = $('#png-optimize-row');
135
- const webpLosslessRow = $('#webp-lossless-row');
136
- const webpEffortRow = $('#webp-effort-row');
137
- const webpSmartSubsampleRow = $('#webp-smartsubsample-row');
138
-
178
+ var format = $('#node-input-outputFormat').val();
179
+ var qualityRow = $('#quality-row');
180
+ var pngCompressionRow = $('#png-compression-row');
181
+ var webpLosslessRow = $('#webp-lossless-row');
182
+ var webpEffortRow = $('#webp-effort-row');
183
+ var webpSmartSubsampleRow = $('#webp-smartsubsample-row');
184
+
139
185
  if (format === 'jpg') {
140
186
  qualityRow.show();
141
- pngOptimizeRow.hide();
187
+ pngCompressionRow.hide();
142
188
  webpLosslessRow.hide();
143
189
  webpEffortRow.hide();
144
190
  webpSmartSubsampleRow.hide();
145
191
  } else if (format === 'webp') {
146
192
  qualityRow.show();
147
- pngOptimizeRow.hide();
193
+ pngCompressionRow.hide();
148
194
  webpLosslessRow.show();
149
195
  webpEffortRow.show();
150
196
  webpSmartSubsampleRow.show();
151
197
  } else if (format === 'png') {
152
198
  qualityRow.hide();
153
- pngOptimizeRow.show();
199
+ pngCompressionRow.show();
154
200
  webpLosslessRow.hide();
155
201
  webpEffortRow.hide();
156
202
  webpSmartSubsampleRow.hide();
157
203
  } else {
158
204
  qualityRow.hide();
159
- pngOptimizeRow.hide();
205
+ pngCompressionRow.hide();
160
206
  webpLosslessRow.hide();
161
207
  webpEffortRow.hide();
162
208
  webpSmartSubsampleRow.hide();
163
209
  }
164
210
  }
165
-
211
+
166
212
  $('#node-input-outputFormat').change(updateQualityVisibility);
167
213
  updateQualityVisibility();
168
-
214
+
169
215
  // Debug checkbox logic
170
- const debugCheckbox = $('#node-input-debugEnabled');
171
- const debugWidthRow = $('#debug-width-row');
172
-
216
+ var debugCheckbox = $('#node-input-debugEnabled');
217
+ var debugWidthRow = $('#debug-width-row');
218
+
173
219
  function updateDebugWidthVisibility() {
174
220
  if (debugCheckbox.prop('checked')) {
175
221
  debugWidthRow.show();
@@ -177,17 +223,17 @@
177
223
  debugWidthRow.hide();
178
224
  }
179
225
  }
180
-
226
+
181
227
  debugCheckbox.change(updateDebugWidthVisibility);
182
228
  updateDebugWidthVisibility();
183
-
229
+
184
230
  // Initialize debug image display
185
231
  initDebugImageDisplay();
186
232
  }
187
233
  };
188
234
  RED.nodes.registerType('rp-image-out', _rpNodeCfg);
189
235
  RED.nodes.registerType('image-out', Object.assign({}, _rpNodeCfg, { category: 'deprecated' }));
190
-
236
+
191
237
  function sendToggleRequest(node, active, onSuccess, onError) {
192
238
  $.ajax({
193
239
  url: "image-out/" + node.id,
@@ -207,18 +253,18 @@
207
253
  });
208
254
  }
209
255
 
210
- // Debug image display functionality (same as other nodes)
256
+ // Debug image display functionality
211
257
  function initDebugImageDisplay() {
212
258
  (function() {
213
259
  var isSubscribed = false;
214
-
260
+
215
261
  function subscribeToDebugImages() {
216
262
  if (isSubscribed || typeof RED === 'undefined' || !RED.comms) return;
217
263
  isSubscribed = true;
218
-
264
+
219
265
  RED.comms.subscribe('debug-image', function(event, data) {
220
266
  if (!data || !data.id) return;
221
-
267
+
222
268
  try {
223
269
  renderDebugImage(data);
224
270
  } catch (err) {
@@ -226,25 +272,24 @@
226
272
  }
227
273
  });
228
274
  }
229
-
275
+
230
276
  function renderDebugImage(data) {
231
- const nodeId = data.id;
232
- const base64Data = data.data;
233
- const format = data.format || 'unknown';
234
- const mimeType = data.mimeType || 'jpeg';
235
-
277
+ var nodeId = data.id;
278
+ var base64Data = data.data;
279
+ var format = data.format || 'unknown';
280
+ var mimeType = data.mimeType || 'jpeg';
281
+
236
282
  if (!base64Data) {
237
283
  removeDebugImage(nodeId);
238
284
  return;
239
285
  }
240
-
241
- const nodeElement = document.getElementById(nodeId);
286
+
287
+ var nodeElement = document.getElementById(nodeId);
242
288
  if (!nodeElement) return;
243
-
244
- let debugContainer = document.getElementById('debug-img-container-' + nodeId);
245
-
289
+
290
+ var debugContainer = document.getElementById('debug-img-container-' + nodeId);
291
+
246
292
  if (!debugContainer) {
247
- // Create SVG foreignObject to embed HTML content in SVG
248
293
  debugContainer = document.createElementNS('http://www.w3.org/2000/svg', 'foreignObject');
249
294
  debugContainer.id = 'debug-img-container-' + nodeId;
250
295
  debugContainer.setAttribute('x', '70');
@@ -252,9 +297,8 @@
252
297
  debugContainer.setAttribute('width', '120');
253
298
  debugContainer.setAttribute('height', '120');
254
299
  debugContainer.style.overflow = 'visible';
255
-
256
- // Create simple image directly inside foreignObject
257
- const img = document.createElement('img');
300
+
301
+ var img = document.createElement('img');
258
302
  img.id = 'debug-img-' + nodeId;
259
303
  img.style.width = '100%';
260
304
  img.style.height = 'auto';
@@ -262,40 +306,39 @@
262
306
  img.style.cursor = 'pointer';
263
307
  img.style.maxHeight = '100px';
264
308
  img.style.maxWidth = '100px';
265
-
309
+
266
310
  img.onclick = function() {
267
311
  removeDebugImage(nodeId);
268
312
  };
269
-
313
+
270
314
  debugContainer.appendChild(img);
271
315
  nodeElement.appendChild(debugContainer);
272
316
  }
273
-
274
- const img = document.getElementById('debug-img-' + nodeId);
275
-
276
- if (img) {
277
- img.src = `data:image/${mimeType};base64,${base64Data}`;
278
- img.title = 'Debug image (click to hide)';
317
+
318
+ var imgEl = document.getElementById('debug-img-' + nodeId);
319
+
320
+ if (imgEl) {
321
+ imgEl.src = 'data:image/' + mimeType + ';base64,' + base64Data;
322
+ imgEl.title = 'Debug image (click to hide)';
279
323
  }
280
324
  }
281
-
325
+
282
326
  function removeDebugImage(nodeId) {
283
- const debugContainer = document.getElementById('debug-img-container-' + nodeId);
327
+ var debugContainer = document.getElementById('debug-img-container-' + nodeId);
284
328
  if (debugContainer) {
285
329
  debugContainer.remove();
286
330
  }
287
331
  }
288
-
332
+
289
333
  function initializeWhenReady() {
290
334
  if (typeof RED !== 'undefined' && RED.comms) {
291
335
  subscribeToDebugImages();
292
-
293
- // Clean up orphaned debug images periodically
336
+
294
337
  setInterval(function() {
295
- const debugContainers = document.querySelectorAll('[id^="debug-img-container-"]');
296
- debugContainers.forEach(container => {
297
- const nodeId = container.id.replace('debug-img-container-', '');
298
- const nodeElement = document.getElementById(nodeId);
338
+ var debugContainers = document.querySelectorAll('[id^="debug-img-container-"]');
339
+ debugContainers.forEach(function(container) {
340
+ var nodeId = container.id.replace('debug-img-container-', '');
341
+ var nodeElement = document.getElementById(nodeId);
299
342
  if (!nodeElement) {
300
343
  container.remove();
301
344
  }
@@ -305,7 +348,7 @@
305
348
  setTimeout(initializeWhenReady, 100);
306
349
  }
307
350
  }
308
-
351
+
309
352
  if (document.readyState === 'loading') {
310
353
  document.addEventListener('DOMContentLoaded', initializeWhenReady);
311
354
  } else {
@@ -320,65 +363,108 @@
320
363
  <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
321
364
  <input type="text" id="node-input-name" placeholder="Name">
322
365
  </div>
323
-
366
+
324
367
  <hr>
325
-
326
- <!-- Folder Configuration -->
368
+
369
+ <!-- Mode Selection -->
327
370
  <div class="form-row">
328
- <label for="node-input-folderPath"><i class="fa fa-folder"></i> Folder Path</label>
329
- <input type="text" id="node-input-folderPath" style="width: 70%;" placeholder="/path/to/save/folder">
330
- <input type="hidden" id="node-input-folderPathType">
371
+ <label for="node-input-mode"><i class="fa fa-list"></i> Mode</label>
372
+ <select id="node-input-mode" style="width: 200px;">
373
+ <option value="single">Single image</option>
374
+ <option value="multiple">Multiple images</option>
375
+ </select>
331
376
  </div>
332
-
333
- <div class="form-row">
334
- <label for="node-input-filenamePrefix"><i class="fa fa-tag"></i> Filename Prefix</label>
335
- <input type="text" id="node-input-filenamePrefix" style="width: 70%;" placeholder="image (optional)">
336
- <input type="hidden" id="node-input-filenamePrefixType">
337
- <div style="margin-left: 106px; margin-top: 4px; color: #666; font-size: 12px;">
338
- Pattern: [prefix]_YYYYMMDD_HHMMSS.[ext]
377
+
378
+ <!-- Single Mode Fields -->
379
+ <div class="imageout-single-mode">
380
+ <div class="form-row">
381
+ <label for="node-input-folderPath"><i class="fa fa-folder"></i> Folder Path</label>
382
+ <input type="text" id="node-input-folderPath" style="width: 70%;" placeholder="/path/to/save/folder">
383
+ <input type="hidden" id="node-input-folderPathType">
339
384
  </div>
340
- </div>
341
385
 
342
- <div class="form-row">
343
- <label for="node-input-filenameFull"><i class="fa fa-file-text-o"></i> Full Filename</label>
344
- <input type="text" id="node-input-filenameFull" style="width: 70%;" placeholder="photo_${payload.id}.jpg (optional)">
345
- <input type="hidden" id="node-input-filenameFullType">
346
- <div style="margin-left: 106px; margin-top: 4px; color: #666; font-size: 12px;">
347
- Overrides prefix & timestamp when provided. Leave blank for automatic naming.
386
+ <div class="form-row">
387
+ <label for="node-input-filenamePrefix"><i class="fa fa-tag"></i> Filename Prefix</label>
388
+ <input type="text" id="node-input-filenamePrefix" style="width: 70%;" placeholder="image (optional)">
389
+ <input type="hidden" id="node-input-filenamePrefixType">
390
+ <div style="margin-left: 106px; margin-top: 4px; color: #666; font-size: 12px;">
391
+ Pattern: [prefix]_YYYYMMDD_HHMMSS.[ext]
392
+ </div>
393
+ </div>
394
+
395
+ <div class="form-row">
396
+ <label for="node-input-filenameFull"><i class="fa fa-file-text-o"></i> Full Filename</label>
397
+ <input type="text" id="node-input-filenameFull" style="width: 70%;" placeholder="photo.jpg (optional)">
398
+ <input type="hidden" id="node-input-filenameFullType">
399
+ <div style="margin-left: 106px; margin-top: 4px; color: #666; font-size: 12px;">
400
+ Overrides prefix & timestamp when provided. Leave blank for automatic naming.
401
+ </div>
402
+ </div>
403
+
404
+ <hr>
405
+
406
+ <div class="form-row">
407
+ <label for="node-input-inputPath"><i class="fa fa-sign-in"></i> Input from</label>
408
+ <input type="text" id="node-input-inputPath" style="width: 70%;">
409
+ <input type="hidden" id="node-input-inputPathType">
348
410
  </div>
349
411
  </div>
350
-
351
- <hr>
352
-
353
- <!-- Input Configuration -->
354
- <div class="form-row">
355
- <label for="node-input-inputPath"><i class="fa fa-sign-in"></i> Input from</label>
356
- <input type="text" id="node-input-inputPath" style="width: 70%;">
357
- <input type="hidden" id="node-input-inputPathType">
412
+
413
+ <!-- Multiple Mode Fields -->
414
+ <div class="imageout-multiple-mode" style="display: none;">
415
+ <div class="form-row">
416
+ <label for="node-input-saveConfig"><i class="fa fa-sign-in"></i> Input</label>
417
+ <input type="text" id="node-input-saveConfig" style="width: 70%;">
418
+ <input type="hidden" id="node-input-saveConfigType">
419
+ <div style="margin-left: 106px; margin-top: 4px; color: #666; font-size: 12px;">
420
+ Array of objects, each containing an image and optional filename/folder.
421
+ </div>
422
+ </div>
423
+
424
+ <div class="form-row">
425
+ <label for="node-input-imageField"><i class="fa fa-picture-o"></i> Image field</label>
426
+ <input type="text" id="node-input-imageField" placeholder="bitmap" style="width: 200px;">
427
+ <div style="margin-left: 106px; margin-top: 4px; color: #666; font-size: 12px;">
428
+ Key name holding the image data in each object.
429
+ </div>
430
+ </div>
431
+
432
+ <div class="form-row">
433
+ <label for="node-input-outputDirField"><i class="fa fa-folder"></i> Output dir</label>
434
+ <input type="text" id="node-input-outputDirField" style="width: 70%;">
435
+ <input type="hidden" id="node-input-outputDirFieldType">
436
+ </div>
437
+
438
+ <div class="form-row">
439
+ <label for="node-input-filenameField"><i class="fa fa-file-text-o"></i> Filename</label>
440
+ <input type="text" id="node-input-filenameField" style="width: 70%;">
441
+ <input type="hidden" id="node-input-filenameFieldType">
442
+ </div>
358
443
  </div>
359
-
444
+
360
445
  <hr>
361
-
362
- <!-- Output Format Configuration -->
446
+
447
+ <!-- Output Format Configuration (shared) -->
363
448
  <div class="form-row">
364
449
  <label for="node-input-outputFormat"><i class="fa fa-file-image-o"></i> Output Format</label>
365
450
  <select id="node-input-outputFormat" style="width: 200px;">
366
451
  <option value="jpg">JPEG</option>
367
452
  <option value="png">PNG</option>
368
453
  <option value="webp">WebP</option>
454
+ <option value="bmp">BMP</option>
369
455
  </select>
370
456
  </div>
371
-
457
+
372
458
  <div class="form-row" id="quality-row">
373
459
  <label for="node-input-outputQuality"><i class="fa fa-sliders"></i> Quality</label>
374
460
  <input type="number" id="node-input-outputQuality" min="1" max="100" value="90" style="width: 70px;">
375
461
  <span style="margin-left: 10px; color: #666;">1-100 (JPEG/WebP only)</span>
376
462
  </div>
377
-
378
- <div class="form-row" id="png-optimize-row" style="display: none;">
379
- <label for="node-input-pngOptimize"><i class="fa fa-compress"></i> PNG Optimize</label>
380
- <input type="checkbox" id="node-input-pngOptimize" style="display:inline-block; width:auto; vertical-align:baseline;">
381
- <label for="node-input-pngOptimize" style="width:auto; margin-left:5px;">Compress PNG (slower, smaller file)</label>
463
+
464
+ <div class="form-row" id="png-compression-row" style="display: none;">
465
+ <label for="node-input-pngCompression"><i class="fa fa-leaf"></i> Compression</label>
466
+ <input type="number" id="node-input-pngCompression" min="0" max="9" step="1" style="width: 70px;">
467
+ <span style="margin-left: 10px; color: #666;">0-9 (higher = smaller file, slower)</span>
382
468
  </div>
383
469
 
384
470
  <div class="form-row" id="webp-lossless-row" style="display: none;">
@@ -398,10 +484,10 @@
398
484
  <input type="number" id="node-input-webpEffort" min="0" max="6" placeholder="4" style="width: 70px;">
399
485
  <span style="margin-left: 10px; color: #666;">0-6 (higher = smaller file, slower)</span>
400
486
  </div>
401
-
487
+
402
488
  <hr>
403
-
404
- <!-- Protection Settings -->
489
+
490
+ <!-- Protection Settings (shared) -->
405
491
  <div class="form-row">
406
492
  <label for="node-input-overwriteProtection"><i class="fa fa-shield"></i> Protection</label>
407
493
  <input type="checkbox" id="node-input-overwriteProtection" style="display:inline-block; width:auto; vertical-align:baseline;" checked>
@@ -414,14 +500,14 @@
414
500
  <input type="hidden" id="node-input-maxImagesType">
415
501
  <span style="margin-left: 10px; color: #666;">0 or blank keeps all files.</span>
416
502
  </div>
417
-
503
+
418
504
  <!-- Debug Configuration -->
419
505
  <div class="form-row">
420
506
  <label for="node-input-debugEnabled"><i class="fa fa-bug"></i> Debug</label>
421
507
  <input type="checkbox" id="node-input-debugEnabled" style="display:inline-block; width:auto; vertical-align:baseline;">
422
508
  <label for="node-input-debugEnabled" style="width:auto; margin-left:5px;">Show saved image preview</label>
423
509
  </div>
424
-
510
+
425
511
  <div class="form-row" id="debug-width-row" style="display: none;">
426
512
  <label for="node-input-debugWidth"><i class="fa fa-arrows-h"></i> Debug Width</label>
427
513
  <input type="text" id="node-input-debugWidth" style="width: 120px;">
@@ -434,65 +520,108 @@
434
520
  <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
435
521
  <input type="text" id="node-input-name" placeholder="Name">
436
522
  </div>
437
-
523
+
438
524
  <hr>
439
-
440
- <!-- Folder Configuration -->
525
+
526
+ <!-- Mode Selection -->
441
527
  <div class="form-row">
442
- <label for="node-input-folderPath"><i class="fa fa-folder"></i> Folder Path</label>
443
- <input type="text" id="node-input-folderPath" style="width: 70%;" placeholder="/path/to/save/folder">
444
- <input type="hidden" id="node-input-folderPathType">
528
+ <label for="node-input-mode"><i class="fa fa-list"></i> Mode</label>
529
+ <select id="node-input-mode" style="width: 200px;">
530
+ <option value="single">Single image</option>
531
+ <option value="multiple">Multiple images</option>
532
+ </select>
445
533
  </div>
446
-
447
- <div class="form-row">
448
- <label for="node-input-filenamePrefix"><i class="fa fa-tag"></i> Filename Prefix</label>
449
- <input type="text" id="node-input-filenamePrefix" style="width: 70%;" placeholder="image (optional)">
450
- <input type="hidden" id="node-input-filenamePrefixType">
451
- <div style="margin-left: 106px; margin-top: 4px; color: #666; font-size: 12px;">
452
- Pattern: [prefix]_YYYYMMDD_HHMMSS.[ext]
534
+
535
+ <!-- Single Mode Fields -->
536
+ <div class="imageout-single-mode">
537
+ <div class="form-row">
538
+ <label for="node-input-folderPath"><i class="fa fa-folder"></i> Folder Path</label>
539
+ <input type="text" id="node-input-folderPath" style="width: 70%;" placeholder="/path/to/save/folder">
540
+ <input type="hidden" id="node-input-folderPathType">
453
541
  </div>
454
- </div>
455
542
 
456
- <div class="form-row">
457
- <label for="node-input-filenameFull"><i class="fa fa-file-text-o"></i> Full Filename</label>
458
- <input type="text" id="node-input-filenameFull" style="width: 70%;" placeholder="photo_${payload.id}.jpg (optional)">
459
- <input type="hidden" id="node-input-filenameFullType">
460
- <div style="margin-left: 106px; margin-top: 4px; color: #666; font-size: 12px;">
461
- Overrides prefix & timestamp when provided. Leave blank for automatic naming.
543
+ <div class="form-row">
544
+ <label for="node-input-filenamePrefix"><i class="fa fa-tag"></i> Filename Prefix</label>
545
+ <input type="text" id="node-input-filenamePrefix" style="width: 70%;" placeholder="image (optional)">
546
+ <input type="hidden" id="node-input-filenamePrefixType">
547
+ <div style="margin-left: 106px; margin-top: 4px; color: #666; font-size: 12px;">
548
+ Pattern: [prefix]_YYYYMMDD_HHMMSS.[ext]
549
+ </div>
550
+ </div>
551
+
552
+ <div class="form-row">
553
+ <label for="node-input-filenameFull"><i class="fa fa-file-text-o"></i> Full Filename</label>
554
+ <input type="text" id="node-input-filenameFull" style="width: 70%;" placeholder="photo.jpg (optional)">
555
+ <input type="hidden" id="node-input-filenameFullType">
556
+ <div style="margin-left: 106px; margin-top: 4px; color: #666; font-size: 12px;">
557
+ Overrides prefix & timestamp when provided. Leave blank for automatic naming.
558
+ </div>
559
+ </div>
560
+
561
+ <hr>
562
+
563
+ <div class="form-row">
564
+ <label for="node-input-inputPath"><i class="fa fa-sign-in"></i> Input from</label>
565
+ <input type="text" id="node-input-inputPath" style="width: 70%;">
566
+ <input type="hidden" id="node-input-inputPathType">
462
567
  </div>
463
568
  </div>
464
-
465
- <hr>
466
-
467
- <!-- Input Configuration -->
468
- <div class="form-row">
469
- <label for="node-input-inputPath"><i class="fa fa-sign-in"></i> Input from</label>
470
- <input type="text" id="node-input-inputPath" style="width: 70%;">
471
- <input type="hidden" id="node-input-inputPathType">
569
+
570
+ <!-- Multiple Mode Fields -->
571
+ <div class="imageout-multiple-mode" style="display: none;">
572
+ <div class="form-row">
573
+ <label for="node-input-saveConfig"><i class="fa fa-sign-in"></i> Input</label>
574
+ <input type="text" id="node-input-saveConfig" style="width: 70%;">
575
+ <input type="hidden" id="node-input-saveConfigType">
576
+ <div style="margin-left: 106px; margin-top: 4px; color: #666; font-size: 12px;">
577
+ Array of objects, each containing an image and optional filename/folder.
578
+ </div>
579
+ </div>
580
+
581
+ <div class="form-row">
582
+ <label for="node-input-imageField"><i class="fa fa-picture-o"></i> Image field</label>
583
+ <input type="text" id="node-input-imageField" placeholder="bitmap" style="width: 200px;">
584
+ <div style="margin-left: 106px; margin-top: 4px; color: #666; font-size: 12px;">
585
+ Key name holding the image data in each object.
586
+ </div>
587
+ </div>
588
+
589
+ <div class="form-row">
590
+ <label for="node-input-outputDirField"><i class="fa fa-folder"></i> Output dir</label>
591
+ <input type="text" id="node-input-outputDirField" style="width: 70%;">
592
+ <input type="hidden" id="node-input-outputDirFieldType">
593
+ </div>
594
+
595
+ <div class="form-row">
596
+ <label for="node-input-filenameField"><i class="fa fa-file-text-o"></i> Filename</label>
597
+ <input type="text" id="node-input-filenameField" style="width: 70%;">
598
+ <input type="hidden" id="node-input-filenameFieldType">
599
+ </div>
472
600
  </div>
473
-
601
+
474
602
  <hr>
475
-
476
- <!-- Output Format Configuration -->
603
+
604
+ <!-- Output Format Configuration (shared) -->
477
605
  <div class="form-row">
478
606
  <label for="node-input-outputFormat"><i class="fa fa-file-image-o"></i> Output Format</label>
479
607
  <select id="node-input-outputFormat" style="width: 200px;">
480
608
  <option value="jpg">JPEG</option>
481
609
  <option value="png">PNG</option>
482
610
  <option value="webp">WebP</option>
611
+ <option value="bmp">BMP</option>
483
612
  </select>
484
613
  </div>
485
-
614
+
486
615
  <div class="form-row" id="quality-row">
487
616
  <label for="node-input-outputQuality"><i class="fa fa-sliders"></i> Quality</label>
488
617
  <input type="number" id="node-input-outputQuality" min="1" max="100" value="90" style="width: 70px;">
489
618
  <span style="margin-left: 10px; color: #666;">1-100 (JPEG/WebP only)</span>
490
619
  </div>
491
-
492
- <div class="form-row" id="png-optimize-row" style="display: none;">
493
- <label for="node-input-pngOptimize"><i class="fa fa-compress"></i> PNG Optimize</label>
494
- <input type="checkbox" id="node-input-pngOptimize" style="display:inline-block; width:auto; vertical-align:baseline;">
495
- <label for="node-input-pngOptimize" style="width:auto; margin-left:5px;">Compress PNG (slower, smaller file)</label>
620
+
621
+ <div class="form-row" id="png-compression-row" style="display: none;">
622
+ <label for="node-input-pngCompression"><i class="fa fa-leaf"></i> Compression</label>
623
+ <input type="number" id="node-input-pngCompression" min="0" max="9" step="1" style="width: 70px;">
624
+ <span style="margin-left: 10px; color: #666;">0-9 (higher = smaller file, slower)</span>
496
625
  </div>
497
626
 
498
627
  <div class="form-row" id="webp-lossless-row" style="display: none;">
@@ -512,10 +641,10 @@
512
641
  <input type="number" id="node-input-webpEffort" min="0" max="6" placeholder="4" style="width: 70px;">
513
642
  <span style="margin-left: 10px; color: #666;">0-6 (higher = smaller file, slower)</span>
514
643
  </div>
515
-
644
+
516
645
  <hr>
517
-
518
- <!-- Protection Settings -->
646
+
647
+ <!-- Protection Settings (shared) -->
519
648
  <div class="form-row">
520
649
  <label for="node-input-overwriteProtection"><i class="fa fa-shield"></i> Protection</label>
521
650
  <input type="checkbox" id="node-input-overwriteProtection" style="display:inline-block; width:auto; vertical-align:baseline;" checked>
@@ -528,14 +657,14 @@
528
657
  <input type="hidden" id="node-input-maxImagesType">
529
658
  <span style="margin-left: 10px; color: #666;">0 or blank keeps all files.</span>
530
659
  </div>
531
-
660
+
532
661
  <!-- Debug Configuration -->
533
662
  <div class="form-row">
534
663
  <label for="node-input-debugEnabled"><i class="fa fa-bug"></i> Debug</label>
535
664
  <input type="checkbox" id="node-input-debugEnabled" style="display:inline-block; width:auto; vertical-align:baseline;">
536
665
  <label for="node-input-debugEnabled" style="width:auto; margin-left:5px;">Show saved image preview</label>
537
666
  </div>
538
-
667
+
539
668
  <div class="form-row" id="debug-width-row" style="display: none;">
540
669
  <label for="node-input-debugWidth"><i class="fa fa-arrows-h"></i> Debug Width</label>
541
670
  <input type="text" id="node-input-debugWidth" style="width: 120px;">
@@ -545,156 +674,166 @@
545
674
 
546
675
  <script type="text/x-red" data-help-name="rp-image-out">
547
676
  <p>Saves images to the filesystem with automatic timestamp-based naming and optional overwrite protection.</p>
548
-
677
+
549
678
  <h3>Details</h3>
550
679
  <p>This node saves image data to disk with automatic timestamp naming to ensure unique filenames. It includes an enable/disable button (similar to the debug node) that allows you to control whether images are saved without modifying your flow.</p>
551
-
680
+
681
+ <h3>Mode</h3>
682
+ <dl class="message-properties">
683
+ <dt>Single image</dt>
684
+ <dd>Saves one image per message using the configured input path, folder, and filename settings.</dd>
685
+ <dt>Multiple images</dt>
686
+ <dd>Accepts an array of objects (e.g., from a batch pipeline). Each object contains an image and optionally a filename and output directory. Saves are processed sequentially to ensure correct overwrite protection and max-images enforcement.</dd>
687
+ </dl>
688
+
552
689
  <h3>Properties</h3>
553
690
  <dl class="message-properties">
554
691
  <dt>Folder Path <span class="property-type">string | msg | flow | global</span></dt>
555
- <dd>The directory where images will be saved. Can be an absolute or relative path. The folder will be created if it doesn't exist. Can be dynamically set from message properties, flow context, or global context.</dd>
556
-
692
+ <dd>(Single mode) The directory where images will be saved. Created automatically if missing.</dd>
693
+
557
694
  <dt>Filename Prefix <span class="property-type">string | msg | flow | global | JSONata</span></dt>
558
- <dd>Optional prefix for the auto-generated filename. If not specified, defaults to <code>image</code>. The final filename pattern is: <code>[prefix]_YYYYMMDD_HHMMSS.[ext]</code>.</dd>
559
-
695
+ <dd>(Single mode) Optional prefix for the auto-generated filename. Defaults to <code>image</code>. Pattern: <code>[prefix]_YYYYMMDD_HHMMSS.[ext]</code>.</dd>
696
+
560
697
  <dt>Full Filename <span class="property-type">string | msg | flow | global | JSONata</span></dt>
561
- <dd>Overrides the prefix/timestamp pattern with an explicit name. Leave blank to keep automatic naming. You can include JSONata expressions or dynamic properties. If the expression supplies an extension (jpg/png/webp), the output format adjusts accordingly.</dd>
562
-
563
- <dt>Input from <span class="property-type">string</span></dt>
564
- <dd>The location of the image data to save. Defaults to <code>msg.payload</code>. Can be set to any message property, flow variable, or global variable.</dd>
565
-
698
+ <dd>(Single mode) Overrides prefix & timestamp with an explicit name. If the extension is provided (jpg/png/webp/bmp), the output format adjusts accordingly.</dd>
699
+
700
+ <dt>Input from <span class="property-type">msg | flow | global</span></dt>
701
+ <dd>(Single mode) Location of the image data to save. Defaults to <code>msg.payload</code>.</dd>
702
+
703
+ <dt>Input <span class="property-type">msg | flow | global</span></dt>
704
+ <dd>(Multiple mode) Array of objects to iterate. Defaults to <code>msg.payload</code>.</dd>
705
+
706
+ <dt>Image field <span class="property-type">string</span></dt>
707
+ <dd>(Multiple mode) Key name in each object holding the image data. Defaults to <code>bitmap</code>.</dd>
708
+
709
+ <dt>Output dir <span class="property-type">item field | str | msg | flow | global</span></dt>
710
+ <dd>(Multiple mode) Per-item folder from a key in each object, or a shared value for all items. Defaults to reading <code>outputDir</code> from each item.</dd>
711
+
712
+ <dt>Filename <span class="property-type">item field | str | msg | flow | global</span></dt>
713
+ <dd>(Multiple mode) Per-item filename from a key in each object, or a shared value. When blank, a timestamped name is generated. Defaults to reading <code>filename</code> from each item.</dd>
714
+
566
715
  <dt>Output Format <span class="property-type">select</span></dt>
567
- <dd>The image format to save: JPEG, PNG, or WebP.</dd>
568
-
716
+ <dd>Image format: JPEG, PNG, WebP, or BMP.</dd>
717
+
569
718
  <dt>Quality <span class="property-type">number</span></dt>
570
- <dd>Quality setting for JPEG and WebP formats (1-100). Higher values mean better quality but larger file sizes.</dd>
719
+ <dd>Quality for JPEG and WebP (1-100).</dd>
720
+
721
+ <dt>PNG Compression <span class="property-type">number</span></dt>
722
+ <dd>PNG compression level (0-9). Higher = smaller file, slower.</dd>
571
723
 
572
724
  <dt>WebP Lossless <span class="property-type">boolean</span></dt>
573
- <dd>When enabled and WebP is selected, encodes using lossless WebP (ignores the lossy quality slider).</dd>
725
+ <dd>Lossless WebP encoding (ignores quality slider).</dd>
574
726
 
575
727
  <dt>WebP Effort <span class="property-type">number</span></dt>
576
- <dd>Optional 0-6 encoder effort when WebP is selected. Higher values are slower but can yield slightly smaller files. Leave blank to use the default.</dd>
728
+ <dd>Encoder effort 0-6 for WebP.</dd>
577
729
 
578
730
  <dt>WebP Smart Subsample <span class="property-type">boolean</span></dt>
579
- <dd>For lossy WebP only: enables smarter chroma downsampling to reduce color artifacts (slower).</dd>
580
-
581
- <dt>PNG Optimize <span class="property-type">boolean</span></dt>
582
- <dd>When enabled, applies maximum compression to PNG files. This creates smaller files but takes more processing time.</dd>
583
-
731
+ <dd>Smarter chroma downsampling for lossy WebP.</dd>
732
+
584
733
  <dt>Overwrite Protection <span class="property-type">boolean</span></dt>
585
- <dd>When enabled (default), automatically appends <code>_2</code>, <code>_3</code>, etc. to filenames if a file with the same name already exists.</dd>
734
+ <dd>Appends <code>_2</code>, <code>_3</code>, etc. if a file already exists.</dd>
735
+
736
+ <dt>Max Images <span class="property-type">number | msg | flow | global</span></dt>
737
+ <dd>FIFO retention: deletes oldest files to keep at most this many.</dd>
586
738
 
587
- <dt>Max Images <span class="property-type">number | msg | flow | global | JSONata</span></dt>
588
- <dd>Optional FIFO retention policy for the target folder. When greater than zero, the node deletes the oldest files after saving to keep at most the specified number of images.</dd>
589
-
590
739
  <dt>Active Button <span class="property-type">button</span></dt>
591
- <dd>Click the button on the node to enable/disable saving. When disabled, the node passes messages through without saving images. The state is indicated by the button color (green = active, gray = inactive).</dd>
740
+ <dd>Enable/disable saving without modifying the flow.</dd>
592
741
  </dl>
593
-
742
+
594
743
  <h3>Inputs</h3>
595
744
  <dl class="message-properties">
596
745
  <dt>Image Object <span class="property-type">object</span></dt>
597
- <dd>Standard image structure with properties: data (Buffer), width, height, channels, colorSpace, dtype.</dd>
746
+ <dd>Standard image structure with properties: data (Buffer), width, height, channels, colorSpace, dtype. Or an encoded Buffer (JPEG/PNG/WebP).</dd>
598
747
  </dl>
599
-
600
- <h3>Outputs</h3>
601
- <p>This node has no outputs. It is a terminal node that saves images to the filesystem.</p>
602
-
603
- <h3>Examples</h3>
604
- <ul>
605
- <li><strong>Basic Save:</strong> Connect to any image processing node output to save the result with timestamp naming.</li>
606
- <li><strong>Dynamic Folder:</strong> Set folder path from <code>msg.folder</code> to save to different locations based on message content.</li>
607
- <li><strong>With Prefix:</strong> Use prefix "webcam" to generate files like: <code>webcam_20240109_143022.jpg</code></li>
608
- <li><strong>Overwrite Protection:</strong> If <code>image_20240109_143022.jpg</code> exists, saves as <code>image_20240109_143022_2.jpg</code></li>
609
- <li><strong>Conditional Saving:</strong> Use the button to enable/disable saving during development or testing.</li>
610
- </ul>
611
-
748
+
612
749
  <h3>Status Indicators</h3>
613
750
  <ul>
614
751
  <li><strong>Gray dot "inactive":</strong> Node is disabled via button</li>
615
- <li><strong>Blue dot "saving...":</strong> Currently writing file to disk</li>
616
- <li><strong>Green dot "saved: filename":</strong> Successfully saved with filename shown</li>
617
- <li><strong>Red dot "Error":</strong> Save failed (check debug panel for details)</li>
752
+ <li><strong>Blue dot "saving...":</strong> Currently writing file(s) to disk</li>
753
+ <li><strong>Green dot "saved: ...":</strong> Successfully saved (shows filename or count)</li>
754
+ <li><strong>Red dot "Error":</strong> Save failed (check debug panel)</li>
618
755
  </ul>
619
-
620
- <h3>Performance</h3>
621
- <p>Image encoding and file writing are performed asynchronously for optimal performance. The node status displays the save time in milliseconds.</p>
622
756
  </script>
623
757
 
624
758
  <script type="text/x-red" data-help-name="image-out">
625
759
  <p>Saves images to the filesystem with automatic timestamp-based naming and optional overwrite protection.</p>
626
-
760
+
627
761
  <h3>Details</h3>
628
762
  <p>This node saves image data to disk with automatic timestamp naming to ensure unique filenames. It includes an enable/disable button (similar to the debug node) that allows you to control whether images are saved without modifying your flow.</p>
629
-
763
+
764
+ <h3>Mode</h3>
765
+ <dl class="message-properties">
766
+ <dt>Single image</dt>
767
+ <dd>Saves one image per message using the configured input path, folder, and filename settings.</dd>
768
+ <dt>Multiple images</dt>
769
+ <dd>Accepts an array of objects (e.g., from a batch pipeline). Each object contains an image and optionally a filename and output directory. Saves are processed sequentially to ensure correct overwrite protection and max-images enforcement.</dd>
770
+ </dl>
771
+
630
772
  <h3>Properties</h3>
631
773
  <dl class="message-properties">
632
774
  <dt>Folder Path <span class="property-type">string | msg | flow | global</span></dt>
633
- <dd>The directory where images will be saved. Can be an absolute or relative path. The folder will be created if it doesn't exist. Can be dynamically set from message properties, flow context, or global context.</dd>
634
-
775
+ <dd>(Single mode) The directory where images will be saved. Created automatically if missing.</dd>
776
+
635
777
  <dt>Filename Prefix <span class="property-type">string | msg | flow | global | JSONata</span></dt>
636
- <dd>Optional prefix for the auto-generated filename. If not specified, defaults to <code>image</code>. The final filename pattern is: <code>[prefix]_YYYYMMDD_HHMMSS.[ext]</code>.</dd>
637
-
778
+ <dd>(Single mode) Optional prefix for the auto-generated filename. Defaults to <code>image</code>. Pattern: <code>[prefix]_YYYYMMDD_HHMMSS.[ext]</code>.</dd>
779
+
638
780
  <dt>Full Filename <span class="property-type">string | msg | flow | global | JSONata</span></dt>
639
- <dd>Overrides the prefix/timestamp pattern with an explicit name. Leave blank to keep automatic naming. You can include JSONata expressions or dynamic properties. If the expression supplies an extension (jpg/png/webp), the output format adjusts accordingly.</dd>
640
-
641
- <dt>Input from <span class="property-type">string</span></dt>
642
- <dd>The location of the image data to save. Defaults to <code>msg.payload</code>. Can be set to any message property, flow variable, or global variable.</dd>
643
-
781
+ <dd>(Single mode) Overrides prefix & timestamp with an explicit name. If the extension is provided (jpg/png/webp/bmp), the output format adjusts accordingly.</dd>
782
+
783
+ <dt>Input from <span class="property-type">msg | flow | global</span></dt>
784
+ <dd>(Single mode) Location of the image data to save. Defaults to <code>msg.payload</code>.</dd>
785
+
786
+ <dt>Input <span class="property-type">msg | flow | global</span></dt>
787
+ <dd>(Multiple mode) Array of objects to iterate. Defaults to <code>msg.payload</code>.</dd>
788
+
789
+ <dt>Image field <span class="property-type">string</span></dt>
790
+ <dd>(Multiple mode) Key name in each object holding the image data. Defaults to <code>bitmap</code>.</dd>
791
+
792
+ <dt>Output dir <span class="property-type">item field | str | msg | flow | global</span></dt>
793
+ <dd>(Multiple mode) Per-item folder from a key in each object, or a shared value for all items. Defaults to reading <code>outputDir</code> from each item.</dd>
794
+
795
+ <dt>Filename <span class="property-type">item field | str | msg | flow | global</span></dt>
796
+ <dd>(Multiple mode) Per-item filename from a key in each object, or a shared value. When blank, a timestamped name is generated. Defaults to reading <code>filename</code> from each item.</dd>
797
+
644
798
  <dt>Output Format <span class="property-type">select</span></dt>
645
- <dd>The image format to save: JPEG, PNG, or WebP.</dd>
646
-
799
+ <dd>Image format: JPEG, PNG, WebP, or BMP.</dd>
800
+
647
801
  <dt>Quality <span class="property-type">number</span></dt>
648
- <dd>Quality setting for JPEG and WebP formats (1-100). Higher values mean better quality but larger file sizes.</dd>
802
+ <dd>Quality for JPEG and WebP (1-100).</dd>
803
+
804
+ <dt>PNG Compression <span class="property-type">number</span></dt>
805
+ <dd>PNG compression level (0-9). Higher = smaller file, slower.</dd>
649
806
 
650
807
  <dt>WebP Lossless <span class="property-type">boolean</span></dt>
651
- <dd>When enabled and WebP is selected, encodes using lossless WebP (ignores the lossy quality slider).</dd>
808
+ <dd>Lossless WebP encoding (ignores quality slider).</dd>
652
809
 
653
810
  <dt>WebP Effort <span class="property-type">number</span></dt>
654
- <dd>Optional 0-6 encoder effort when WebP is selected. Higher values are slower but can yield slightly smaller files. Leave blank to use the default.</dd>
811
+ <dd>Encoder effort 0-6 for WebP.</dd>
655
812
 
656
813
  <dt>WebP Smart Subsample <span class="property-type">boolean</span></dt>
657
- <dd>For lossy WebP only: enables smarter chroma downsampling to reduce color artifacts (slower).</dd>
658
-
659
- <dt>PNG Optimize <span class="property-type">boolean</span></dt>
660
- <dd>When enabled, applies maximum compression to PNG files. This creates smaller files but takes more processing time.</dd>
661
-
814
+ <dd>Smarter chroma downsampling for lossy WebP.</dd>
815
+
662
816
  <dt>Overwrite Protection <span class="property-type">boolean</span></dt>
663
- <dd>When enabled (default), automatically appends <code>_2</code>, <code>_3</code>, etc. to filenames if a file with the same name already exists.</dd>
817
+ <dd>Appends <code>_2</code>, <code>_3</code>, etc. if a file already exists.</dd>
818
+
819
+ <dt>Max Images <span class="property-type">number | msg | flow | global</span></dt>
820
+ <dd>FIFO retention: deletes oldest files to keep at most this many.</dd>
664
821
 
665
- <dt>Max Images <span class="property-type">number | msg | flow | global | JSONata</span></dt>
666
- <dd>Optional FIFO retention policy for the target folder. When greater than zero, the node deletes the oldest files after saving to keep at most the specified number of images.</dd>
667
-
668
822
  <dt>Active Button <span class="property-type">button</span></dt>
669
- <dd>Click the button on the node to enable/disable saving. When disabled, the node passes messages through without saving images. The state is indicated by the button color (green = active, gray = inactive).</dd>
823
+ <dd>Enable/disable saving without modifying the flow.</dd>
670
824
  </dl>
671
-
825
+
672
826
  <h3>Inputs</h3>
673
827
  <dl class="message-properties">
674
828
  <dt>Image Object <span class="property-type">object</span></dt>
675
- <dd>Standard image structure with properties: data (Buffer), width, height, channels, colorSpace, dtype.</dd>
829
+ <dd>Standard image structure with properties: data (Buffer), width, height, channels, colorSpace, dtype. Or an encoded Buffer (JPEG/PNG/WebP).</dd>
676
830
  </dl>
677
-
678
- <h3>Outputs</h3>
679
- <p>This node has no outputs. It is a terminal node that saves images to the filesystem.</p>
680
-
681
- <h3>Examples</h3>
682
- <ul>
683
- <li><strong>Basic Save:</strong> Connect to any image processing node output to save the result with timestamp naming.</li>
684
- <li><strong>Dynamic Folder:</strong> Set folder path from <code>msg.folder</code> to save to different locations based on message content.</li>
685
- <li><strong>With Prefix:</strong> Use prefix "webcam" to generate files like: <code>webcam_20240109_143022.jpg</code></li>
686
- <li><strong>Overwrite Protection:</strong> If <code>image_20240109_143022.jpg</code> exists, saves as <code>image_20240109_143022_2.jpg</code></li>
687
- <li><strong>Conditional Saving:</strong> Use the button to enable/disable saving during development or testing.</li>
688
- </ul>
689
-
831
+
690
832
  <h3>Status Indicators</h3>
691
833
  <ul>
692
834
  <li><strong>Gray dot "inactive":</strong> Node is disabled via button</li>
693
- <li><strong>Blue dot "saving...":</strong> Currently writing file to disk</li>
694
- <li><strong>Green dot "saved: filename":</strong> Successfully saved with filename shown</li>
695
- <li><strong>Red dot "Error":</strong> Save failed (check debug panel for details)</li>
835
+ <li><strong>Blue dot "saving...":</strong> Currently writing file(s) to disk</li>
836
+ <li><strong>Green dot "saved: ...":</strong> Successfully saved (shows filename or count)</li>
837
+ <li><strong>Red dot "Error":</strong> Save failed (check debug panel)</li>
696
838
  </ul>
697
-
698
- <h3>Performance</h3>
699
- <p>Image encoding and file writing are performed asynchronously for optimal performance. The node status displays the save time in milliseconds.</p>
700
839
  </script>