n8n-nodes-h2i 1.0.4 → 1.0.5
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/dist/nodes/DavixH2I/DavixH2I.node.js +510 -319
- package/package.json +1 -1
|
@@ -359,6 +359,7 @@ class DavixH2I {
|
|
|
359
359
|
name: 'pdfPageSize',
|
|
360
360
|
type: 'options',
|
|
361
361
|
default: 'auto',
|
|
362
|
+
description: 'Page size to use when exporting to PDF.',
|
|
362
363
|
options: [
|
|
363
364
|
{ name: 'Auto', value: 'auto' },
|
|
364
365
|
{ name: 'A4', value: 'a4' },
|
|
@@ -371,6 +372,7 @@ class DavixH2I {
|
|
|
371
372
|
name: 'pdfOrientation',
|
|
372
373
|
type: 'options',
|
|
373
374
|
default: 'portrait',
|
|
375
|
+
description: 'Orientation for pages in the exported PDF.',
|
|
374
376
|
options: [
|
|
375
377
|
{ name: 'Portrait', value: 'portrait' },
|
|
376
378
|
{ name: 'Landscape', value: 'landscape' },
|
|
@@ -382,6 +384,7 @@ class DavixH2I {
|
|
|
382
384
|
name: 'pdfMargin',
|
|
383
385
|
type: 'number',
|
|
384
386
|
default: 0,
|
|
387
|
+
description: 'Margin (in pixels) applied to the exported PDF pages.',
|
|
385
388
|
displayOptions: { show: { resource: ['image'], operation: ['pdf'] } },
|
|
386
389
|
},
|
|
387
390
|
{
|
|
@@ -389,6 +392,7 @@ class DavixH2I {
|
|
|
389
392
|
name: 'pdfEmbedFormat',
|
|
390
393
|
type: 'options',
|
|
391
394
|
default: 'png',
|
|
395
|
+
description: 'Image format embedded inside the generated PDF.',
|
|
392
396
|
options: [
|
|
393
397
|
{ name: 'PNG', value: 'png' },
|
|
394
398
|
{ name: 'JPEG', value: 'jpeg' },
|
|
@@ -400,161 +404,235 @@ class DavixH2I {
|
|
|
400
404
|
name: 'pdfJpegQuality',
|
|
401
405
|
type: 'number',
|
|
402
406
|
default: 85,
|
|
407
|
+
description: 'JPEG quality used when embedding images into the PDF.',
|
|
403
408
|
displayOptions: { show: { resource: ['image'], operation: ['pdf'] } },
|
|
404
409
|
},
|
|
405
410
|
{ displayName: 'Include Raw EXIF', name: 'includeRawExif', type: 'boolean', default: false, description: 'Include raw EXIF data when available.', displayOptions: { show: { resource: ['image'], operation: ['metadata'] } } },
|
|
406
411
|
{
|
|
407
|
-
displayName: '
|
|
408
|
-
name: '
|
|
409
|
-
type: '
|
|
410
|
-
default:
|
|
411
|
-
|
|
412
|
-
description: 'Optional PixLab multitask parameters. Only selected options are sent.',
|
|
412
|
+
displayName: 'Actions',
|
|
413
|
+
name: 'actions',
|
|
414
|
+
type: 'multiOptions',
|
|
415
|
+
default: [],
|
|
416
|
+
description: 'Select one or more actions to apply. Selecting an action reveals its parameters below.',
|
|
413
417
|
displayOptions: { show: { resource: ['image'], operation: ['multitask'] } },
|
|
414
418
|
options: [
|
|
415
|
-
{
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
{
|
|
434
|
-
{
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
],
|
|
545
|
-
},
|
|
546
|
-
{ displayName: 'PDF JPEG Quality', name: 'pdfJpegQuality', type: 'number', default: 85, description: 'JPEG quality for PDF embedding.' },
|
|
547
|
-
{ displayName: 'Include Raw EXIF', name: 'includeRawExif', type: 'boolean', default: false, description: 'Include raw EXIF data when available.' },
|
|
419
|
+
{ name: 'Format', value: 'format' },
|
|
420
|
+
{ name: 'Resize', value: 'resize' },
|
|
421
|
+
{ name: 'Crop', value: 'crop' },
|
|
422
|
+
{ name: 'Transform', value: 'transform' },
|
|
423
|
+
{ name: 'Compress', value: 'compress' },
|
|
424
|
+
{ name: 'Enhance', value: 'enhance' },
|
|
425
|
+
{ name: 'Frame', value: 'frame' },
|
|
426
|
+
{ name: 'Background', value: 'background' },
|
|
427
|
+
{ name: 'Watermark', value: 'watermark' },
|
|
428
|
+
],
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
displayName: 'Format',
|
|
432
|
+
name: 'multitaskFormat',
|
|
433
|
+
type: 'options',
|
|
434
|
+
default: 'webp',
|
|
435
|
+
description: 'Output format for the multitask result.',
|
|
436
|
+
options: [
|
|
437
|
+
{ name: 'JPEG', value: 'jpeg' },
|
|
438
|
+
{ name: 'PNG', value: 'png' },
|
|
439
|
+
{ name: 'WebP', value: 'webp' },
|
|
440
|
+
{ name: 'AVIF', value: 'avif' },
|
|
441
|
+
{ name: 'GIF', value: 'gif' },
|
|
442
|
+
{ name: 'SVG', value: 'svg' },
|
|
443
|
+
{ name: 'PDF', value: 'pdf' },
|
|
444
|
+
],
|
|
445
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'] } },
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
displayName: 'Keep Metadata',
|
|
449
|
+
name: 'multitaskKeepMetadata',
|
|
450
|
+
type: 'boolean',
|
|
451
|
+
default: false,
|
|
452
|
+
description: 'Preserve EXIF/metadata for the multitask request when possible.',
|
|
453
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'] } },
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
displayName: 'Format Action',
|
|
457
|
+
name: 'formatNotice',
|
|
458
|
+
type: 'notice',
|
|
459
|
+
default: '────────── Format action ──────────',
|
|
460
|
+
description: 'Parameters below apply to the Format action.',
|
|
461
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['format'] } },
|
|
462
|
+
},
|
|
463
|
+
{ displayName: 'Width', name: 'formatWidth', type: 'number', default: 0, description: 'Resize width in pixels for format.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['format'] } } },
|
|
464
|
+
{ displayName: 'Height', name: 'formatHeight', type: 'number', default: 0, description: 'Resize height in pixels for format.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['format'] } } },
|
|
465
|
+
{
|
|
466
|
+
displayName: 'Resize Action',
|
|
467
|
+
name: 'resizeNotice',
|
|
468
|
+
type: 'notice',
|
|
469
|
+
default: '────────── Resize action ──────────',
|
|
470
|
+
description: 'Parameters below apply to the Resize action.',
|
|
471
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['resize'] } },
|
|
472
|
+
},
|
|
473
|
+
{ displayName: 'Width', name: 'resizeWidth', type: 'number', default: 0, description: 'Resize width in pixels.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['resize'] } } },
|
|
474
|
+
{ displayName: 'Height', name: 'resizeHeight', type: 'number', default: 0, description: 'Resize height in pixels.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['resize'] } } },
|
|
475
|
+
{ displayName: 'Enlarge', name: 'resizeEnlarge', type: 'boolean', default: false, description: 'Allow upscaling when resizing.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['resize'] } } },
|
|
476
|
+
{
|
|
477
|
+
displayName: 'Normalize Orientation',
|
|
478
|
+
name: 'resizeNormalizeOrientation',
|
|
479
|
+
type: 'boolean',
|
|
480
|
+
default: false,
|
|
481
|
+
description: 'Auto-rotate based on EXIF orientation.',
|
|
482
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['resize'] } },
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
displayName: 'Crop Action',
|
|
486
|
+
name: 'cropNotice',
|
|
487
|
+
type: 'notice',
|
|
488
|
+
default: '────────── Crop action ──────────',
|
|
489
|
+
description: 'Parameters below apply to the Crop action.',
|
|
490
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['crop'] } },
|
|
491
|
+
},
|
|
492
|
+
{ displayName: 'Crop X', name: 'cropXMulti', type: 'number', default: 0, description: 'Left offset for crop.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['crop'] } } },
|
|
493
|
+
{ displayName: 'Crop Y', name: 'cropYMulti', type: 'number', default: 0, description: 'Top offset for crop.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['crop'] } } },
|
|
494
|
+
{ displayName: 'Crop Width', name: 'cropWidthMulti', type: 'number', default: 0, description: 'Crop width in pixels.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['crop'] } } },
|
|
495
|
+
{ displayName: 'Crop Height', name: 'cropHeightMulti', type: 'number', default: 0, description: 'Crop height in pixels.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['crop'] } } },
|
|
496
|
+
{
|
|
497
|
+
displayName: 'Normalize Orientation',
|
|
498
|
+
name: 'cropNormalizeOrientation',
|
|
499
|
+
type: 'boolean',
|
|
500
|
+
default: false,
|
|
501
|
+
description: 'Auto-rotate before cropping based on EXIF orientation.',
|
|
502
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['crop'] } },
|
|
503
|
+
},
|
|
504
|
+
{ displayName: 'Background Color', name: 'cropBackgroundColor', type: 'string', default: '', description: 'Background color used when the crop exceeds bounds.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['crop'] } } },
|
|
505
|
+
{
|
|
506
|
+
displayName: 'Transform Action',
|
|
507
|
+
name: 'transformNotice',
|
|
508
|
+
type: 'notice',
|
|
509
|
+
default: '────────── Transform action ──────────',
|
|
510
|
+
description: 'Parameters below apply to the Transform action.',
|
|
511
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['transform'] } },
|
|
512
|
+
},
|
|
513
|
+
{ displayName: 'Rotate (degrees)', name: 'transformRotate', type: 'number', default: 0, description: 'Rotate image by degrees.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['transform'] } } },
|
|
514
|
+
{ displayName: 'Flip Horizontal', name: 'transformFlipH', type: 'boolean', default: false, description: 'Flip image horizontally.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['transform'] } } },
|
|
515
|
+
{ displayName: 'Flip Vertical', name: 'transformFlipV', type: 'boolean', default: false, description: 'Flip image vertically.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['transform'] } } },
|
|
516
|
+
{
|
|
517
|
+
displayName: 'Color Space',
|
|
518
|
+
name: 'transformColorSpace',
|
|
519
|
+
type: 'options',
|
|
520
|
+
default: 'srgb',
|
|
521
|
+
description: 'Color space to use for transforms.',
|
|
522
|
+
options: [
|
|
523
|
+
{ name: 'sRGB', value: 'srgb' },
|
|
524
|
+
{ name: 'Display P3', value: 'display-p3' },
|
|
525
|
+
],
|
|
526
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['transform'] } },
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
displayName: 'Compress Action',
|
|
530
|
+
name: 'compressNotice',
|
|
531
|
+
type: 'notice',
|
|
532
|
+
default: '────────── Compress action ──────────',
|
|
533
|
+
description: 'Parameters below apply to the Compress action.',
|
|
534
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['compress'] } },
|
|
535
|
+
},
|
|
536
|
+
{ displayName: 'Quality', name: 'compressQuality', type: 'number', default: 82, description: 'Output quality (1-100).', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['compress'] } } },
|
|
537
|
+
{ displayName: 'Target Size (KB)', name: 'compressTargetSizeKB', type: 'number', default: 0, description: 'Target compressed size in KB.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['compress'] } } },
|
|
538
|
+
{ displayName: 'Background Color', name: 'compressBackgroundColor', type: 'string', default: '', description: 'Background color used for compression fills.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['compress'] } } },
|
|
539
|
+
{
|
|
540
|
+
displayName: 'Color Space',
|
|
541
|
+
name: 'compressColorSpace',
|
|
542
|
+
type: 'options',
|
|
543
|
+
default: 'srgb',
|
|
544
|
+
description: 'Color space to use for compression.',
|
|
545
|
+
options: [
|
|
546
|
+
{ name: 'sRGB', value: 'srgb' },
|
|
547
|
+
{ name: 'Display P3', value: 'display-p3' },
|
|
548
548
|
],
|
|
549
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['compress'] } },
|
|
549
550
|
},
|
|
551
|
+
{
|
|
552
|
+
displayName: 'Enhance Action',
|
|
553
|
+
name: 'enhanceNotice',
|
|
554
|
+
type: 'notice',
|
|
555
|
+
default: '────────── Enhance action ──────────',
|
|
556
|
+
description: 'Parameters below apply to the Enhance action.',
|
|
557
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['enhance'] } },
|
|
558
|
+
},
|
|
559
|
+
{ displayName: 'Blur', name: 'enhanceBlur', type: 'number', default: 0, description: 'Blur radius.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['enhance'] } } },
|
|
560
|
+
{ displayName: 'Sharpen', name: 'enhanceSharpen', type: 'number', default: 0, description: 'Sharpen amount.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['enhance'] } } },
|
|
561
|
+
{ displayName: 'Grayscale', name: 'enhanceGrayscale', type: 'boolean', default: false, description: 'Convert to grayscale.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['enhance'] } } },
|
|
562
|
+
{ displayName: 'Sepia', name: 'enhanceSepia', type: 'boolean', default: false, description: 'Apply sepia tone.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['enhance'] } } },
|
|
563
|
+
{ displayName: 'Brightness', name: 'enhanceBrightness', type: 'number', default: 0, description: 'Brightness adjustment (-100 to 100).', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['enhance'] } } },
|
|
564
|
+
{ displayName: 'Contrast', name: 'enhanceContrast', type: 'number', default: 0, description: 'Contrast adjustment (-100 to 100).', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['enhance'] } } },
|
|
565
|
+
{ displayName: 'Saturation', name: 'enhanceSaturation', type: 'number', default: 0, description: 'Saturation adjustment (-100 to 100).', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['enhance'] } } },
|
|
566
|
+
{
|
|
567
|
+
displayName: 'Normalize Orientation',
|
|
568
|
+
name: 'enhanceNormalizeOrientation',
|
|
569
|
+
type: 'boolean',
|
|
570
|
+
default: false,
|
|
571
|
+
description: 'Auto-rotate based on EXIF orientation before enhancing.',
|
|
572
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['enhance'] } },
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
displayName: 'Frame Action',
|
|
576
|
+
name: 'frameNotice',
|
|
577
|
+
type: 'notice',
|
|
578
|
+
default: '────────── Frame action ──────────',
|
|
579
|
+
description: 'Parameters below apply to the Frame action.',
|
|
580
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['frame'] } },
|
|
581
|
+
},
|
|
582
|
+
{ displayName: 'Pad', name: 'framePad', type: 'number', default: 0, description: 'Uniform padding size.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['frame'] } } },
|
|
583
|
+
{ displayName: 'Pad Color', name: 'framePadColor', type: 'string', default: '', description: 'Padding color (e.g. #ffffff).', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['frame'] } } },
|
|
584
|
+
{ displayName: 'Border', name: 'frameBorder', type: 'number', default: 0, description: 'Border thickness in pixels.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['frame'] } } },
|
|
585
|
+
{ displayName: 'Border Color', name: 'frameBorderColor', type: 'string', default: '', description: 'Border color (e.g. #000000).', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['frame'] } } },
|
|
586
|
+
{ displayName: 'Border Radius', name: 'frameBorderRadius', type: 'number', default: 0, description: 'Rounded corner radius.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['frame'] } } },
|
|
587
|
+
{
|
|
588
|
+
displayName: 'Background Action',
|
|
589
|
+
name: 'backgroundNotice',
|
|
590
|
+
type: 'notice',
|
|
591
|
+
default: '────────── Background action ──────────',
|
|
592
|
+
description: 'Parameters below apply to the Background action.',
|
|
593
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['background'] } },
|
|
594
|
+
},
|
|
595
|
+
{ displayName: 'Background Color', name: 'backgroundColorMulti', type: 'string', default: '', description: 'Background color to apply.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['background'] } } },
|
|
596
|
+
{ displayName: 'Background Blur', name: 'backgroundBlurMulti', type: 'number', default: 0, description: 'Blur background by this radius.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['background'] } } },
|
|
597
|
+
{ displayName: 'Border Radius', name: 'backgroundBorderRadius', type: 'number', default: 0, description: 'Rounded corner radius.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['background'] } } },
|
|
598
|
+
{ displayName: 'Pad Color', name: 'backgroundPadColor', type: 'string', default: '', description: 'Padding color for background.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['background'] } } },
|
|
599
|
+
{
|
|
600
|
+
displayName: 'Watermark Action',
|
|
601
|
+
name: 'watermarkNotice',
|
|
602
|
+
type: 'notice',
|
|
603
|
+
default: '────────── Watermark action ──────────',
|
|
604
|
+
description: 'Parameters below apply to the Watermark action.',
|
|
605
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['watermark'] } },
|
|
606
|
+
},
|
|
607
|
+
{ displayName: 'Watermark Text', name: 'watermarkTextMulti', type: 'string', default: '', description: 'Text watermark content.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['watermark'] } } },
|
|
608
|
+
{ displayName: 'Watermark Opacity', name: 'watermarkOpacityMulti', type: 'number', default: 0.35, description: 'Watermark opacity (0-1).', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['watermark'] } } },
|
|
609
|
+
{
|
|
610
|
+
displayName: 'Watermark Position',
|
|
611
|
+
name: 'watermarkPositionMulti',
|
|
612
|
+
type: 'options',
|
|
613
|
+
default: 'center',
|
|
614
|
+
description: 'Placement for watermark.',
|
|
615
|
+
options: [
|
|
616
|
+
{ name: 'Center', value: 'center' },
|
|
617
|
+
{ name: 'Top Left', value: 'top-left' },
|
|
618
|
+
{ name: 'Top Right', value: 'top-right' },
|
|
619
|
+
{ name: 'Bottom Left', value: 'bottom-left' },
|
|
620
|
+
{ name: 'Bottom Right', value: 'bottom-right' },
|
|
621
|
+
],
|
|
622
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['watermark'] } },
|
|
623
|
+
},
|
|
624
|
+
{ displayName: 'Watermark Margin', name: 'watermarkMarginMulti', type: 'number', default: 8, description: 'Margin/padding around watermark.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['watermark'] } } },
|
|
625
|
+
{ displayName: 'Watermark Scale', name: 'watermarkScaleMulti', type: 'number', default: 1, description: 'Scale factor for watermark.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['watermark'] } } },
|
|
626
|
+
{ displayName: 'Watermark Color', name: 'watermarkColorMulti', type: 'string', default: '#000000', description: 'Color for text watermark.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['watermark'] } } },
|
|
627
|
+
{ displayName: 'Watermark Font Size', name: 'watermarkFontSizeMulti', type: 'number', default: 24, description: 'Font size for text watermark.', displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['watermark'] } } },
|
|
550
628
|
{
|
|
551
629
|
displayName: 'Watermark Image Binary Property',
|
|
552
|
-
name: '
|
|
630
|
+
name: 'watermarkBinaryPropertyMulti',
|
|
553
631
|
type: 'string',
|
|
554
632
|
default: '',
|
|
555
633
|
placeholder: 'watermarkImage',
|
|
556
|
-
description: 'Binary property containing an image watermark (
|
|
557
|
-
displayOptions: { show: { resource: ['image'], operation: ['multitask'] } },
|
|
634
|
+
description: 'Binary property containing an image watermark (optional).',
|
|
635
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['watermark'] } },
|
|
558
636
|
},
|
|
559
637
|
{
|
|
560
638
|
displayName: 'Download Result(s) as Binary',
|
|
@@ -773,67 +851,173 @@ class DavixH2I {
|
|
|
773
851
|
displayOptions: { show: { resource: ['tools'], operation: ['multitask'] } },
|
|
774
852
|
},
|
|
775
853
|
{
|
|
776
|
-
displayName: '
|
|
777
|
-
name: '
|
|
778
|
-
type: '
|
|
779
|
-
default:
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
854
|
+
displayName: 'Metadata Tool',
|
|
855
|
+
name: 'metadataToolNoticeSingle',
|
|
856
|
+
type: 'notice',
|
|
857
|
+
default: '────────── Metadata tool ──────────',
|
|
858
|
+
description: 'Parameters for the Metadata tool.',
|
|
859
|
+
displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['metadata'] } },
|
|
860
|
+
},
|
|
861
|
+
{
|
|
862
|
+
displayName: 'Include Raw EXIF',
|
|
863
|
+
name: 'includeRawExifSingle',
|
|
864
|
+
type: 'boolean',
|
|
865
|
+
default: false,
|
|
866
|
+
description: 'Include raw EXIF data when available (metadata tool).',
|
|
867
|
+
displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['metadata'] } },
|
|
868
|
+
},
|
|
869
|
+
{
|
|
870
|
+
displayName: 'Palette Tool',
|
|
871
|
+
name: 'paletteToolNoticeSingle',
|
|
872
|
+
type: 'notice',
|
|
873
|
+
default: '────────── Palette tool ──────────',
|
|
874
|
+
description: 'Parameters for the Palette tool.',
|
|
875
|
+
displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['palette'] } },
|
|
876
|
+
},
|
|
877
|
+
{ displayName: 'Palette Size', name: 'paletteSizeSingle', type: 'number', default: 5, description: 'Number of colors to extract (palette tool).', displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['palette'] } } },
|
|
878
|
+
{
|
|
879
|
+
displayName: 'Hash Tool',
|
|
880
|
+
name: 'hashToolNoticeSingle',
|
|
881
|
+
type: 'notice',
|
|
882
|
+
default: '────────── Hash tool ──────────',
|
|
883
|
+
description: 'Parameters for the Hash tool.',
|
|
884
|
+
displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['hash'] } },
|
|
885
|
+
},
|
|
886
|
+
{
|
|
887
|
+
displayName: 'Hash Type',
|
|
888
|
+
name: 'hashTypeSingle',
|
|
889
|
+
type: 'options',
|
|
890
|
+
default: 'phash',
|
|
891
|
+
description: 'Hash algorithm to compute (hash tool).',
|
|
783
892
|
options: [
|
|
784
|
-
{
|
|
785
|
-
{
|
|
786
|
-
{
|
|
787
|
-
displayName: 'Hash Type',
|
|
788
|
-
name: 'hashType',
|
|
789
|
-
type: 'options',
|
|
790
|
-
default: 'phash',
|
|
791
|
-
description: 'Hash algorithm to compute (hash tool).',
|
|
792
|
-
options: [
|
|
793
|
-
{ name: 'pHash', value: 'phash' },
|
|
794
|
-
{ name: 'MD5', value: 'md5' },
|
|
795
|
-
{ name: 'SHA1', value: 'sha1' },
|
|
796
|
-
],
|
|
797
|
-
},
|
|
798
|
-
{ displayName: 'Similarity Mode', name: 'similarityMode', type: 'string', default: '', description: 'Similarity mode (similarity tool).' },
|
|
799
|
-
{ displayName: 'Similarity Threshold', name: 'similarityThreshold', type: 'number', default: 0, description: 'Similarity threshold (similarity tool).' },
|
|
800
|
-
{ displayName: 'Quality Sample', name: 'qualitySample', type: 'number', default: 0, description: 'Sample size for quality analysis (quality tool).' },
|
|
801
|
-
{ displayName: 'Transparency Sample', name: 'transparencySample', type: 'number', default: 0, description: 'Sample size for transparency analysis (transparency tool).' },
|
|
802
|
-
{ displayName: 'Efficiency Format', name: 'efficiencyFormat', type: 'string', default: '', description: 'Output format for efficiency tool.' },
|
|
803
|
-
{ displayName: 'Efficiency Quality', name: 'efficiencyQuality', type: 'number', default: 0, description: 'Quality setting for efficiency tool.' },
|
|
893
|
+
{ name: 'pHash', value: 'phash' },
|
|
894
|
+
{ name: 'MD5', value: 'md5' },
|
|
895
|
+
{ name: 'SHA1', value: 'sha1' },
|
|
804
896
|
],
|
|
897
|
+
displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['hash'] } },
|
|
805
898
|
},
|
|
806
899
|
{
|
|
807
|
-
displayName: '
|
|
808
|
-
name: '
|
|
809
|
-
type: '
|
|
810
|
-
default:
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
900
|
+
displayName: 'Similarity Tool',
|
|
901
|
+
name: 'similarityToolNoticeSingle',
|
|
902
|
+
type: 'notice',
|
|
903
|
+
default: '────────── Similarity tool ──────────',
|
|
904
|
+
description: 'Parameters for the Similarity tool.',
|
|
905
|
+
displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['similarity'] } },
|
|
906
|
+
},
|
|
907
|
+
{ displayName: 'Similarity Mode', name: 'similarityModeSingle', type: 'string', default: '', description: 'Similarity mode (similarity tool).', displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['similarity'] } } },
|
|
908
|
+
{ displayName: 'Similarity Threshold', name: 'similarityThresholdSingle', type: 'number', default: 0, description: 'Similarity threshold (similarity tool).', displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['similarity'] } } },
|
|
909
|
+
{
|
|
910
|
+
displayName: 'Quality Tool',
|
|
911
|
+
name: 'qualityToolNoticeSingle',
|
|
912
|
+
type: 'notice',
|
|
913
|
+
default: '────────── Quality tool ──────────',
|
|
914
|
+
description: 'Parameters for the Quality tool.',
|
|
915
|
+
displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['quality'] } },
|
|
916
|
+
},
|
|
917
|
+
{ displayName: 'Quality Sample', name: 'qualitySampleSingle', type: 'number', default: 0, description: 'Sample size for quality analysis.', displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['quality'] } } },
|
|
918
|
+
{
|
|
919
|
+
displayName: 'Transparency Tool',
|
|
920
|
+
name: 'transparencyToolNoticeSingle',
|
|
921
|
+
type: 'notice',
|
|
922
|
+
default: '────────── Transparency tool ──────────',
|
|
923
|
+
description: 'Parameters for the Transparency tool.',
|
|
924
|
+
displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['transparency'] } },
|
|
925
|
+
},
|
|
926
|
+
{ displayName: 'Transparency Sample', name: 'transparencySampleSingle', type: 'number', default: 0, description: 'Sample size for transparency analysis.', displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['transparency'] } } },
|
|
927
|
+
{
|
|
928
|
+
displayName: 'Efficiency Tool',
|
|
929
|
+
name: 'efficiencyToolNoticeSingle',
|
|
930
|
+
type: 'notice',
|
|
931
|
+
default: '────────── Efficiency tool ──────────',
|
|
932
|
+
description: 'Parameters for the Efficiency tool.',
|
|
933
|
+
displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['efficiency'] } },
|
|
934
|
+
},
|
|
935
|
+
{ displayName: 'Efficiency Format', name: 'efficiencyFormatSingle', type: 'string', default: '', description: 'Output format for efficiency tool.', displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['efficiency'] } } },
|
|
936
|
+
{ displayName: 'Efficiency Quality', name: 'efficiencyQualitySingle', type: 'number', default: 0, description: 'Quality setting for efficiency tool.', displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['efficiency'] } } },
|
|
937
|
+
{
|
|
938
|
+
displayName: 'Metadata Tool',
|
|
939
|
+
name: 'metadataToolNoticeMulti',
|
|
940
|
+
type: 'notice',
|
|
941
|
+
default: '────────── Metadata tool ──────────',
|
|
942
|
+
description: 'Parameters for the Metadata tool.',
|
|
943
|
+
displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['metadata'] } },
|
|
944
|
+
},
|
|
945
|
+
{
|
|
946
|
+
displayName: 'Include Raw EXIF',
|
|
947
|
+
name: 'includeRawExifMulti',
|
|
948
|
+
type: 'boolean',
|
|
949
|
+
default: false,
|
|
950
|
+
description: 'Include raw EXIF data when available (metadata tool).',
|
|
951
|
+
displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['metadata'] } },
|
|
952
|
+
},
|
|
953
|
+
{
|
|
954
|
+
displayName: 'Palette Tool',
|
|
955
|
+
name: 'paletteToolNoticeMulti',
|
|
956
|
+
type: 'notice',
|
|
957
|
+
default: '────────── Palette tool ──────────',
|
|
958
|
+
description: 'Parameters for the Palette tool.',
|
|
959
|
+
displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['palette'] } },
|
|
960
|
+
},
|
|
961
|
+
{ displayName: 'Palette Size', name: 'paletteSizeMulti', type: 'number', default: 5, description: 'Number of colors to extract (palette tool).', displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['palette'] } } },
|
|
962
|
+
{
|
|
963
|
+
displayName: 'Hash Tool',
|
|
964
|
+
name: 'hashToolNoticeMulti',
|
|
965
|
+
type: 'notice',
|
|
966
|
+
default: '────────── Hash tool ──────────',
|
|
967
|
+
description: 'Parameters for the Hash tool.',
|
|
968
|
+
displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['hash'] } },
|
|
969
|
+
},
|
|
970
|
+
{
|
|
971
|
+
displayName: 'Hash Type',
|
|
972
|
+
name: 'hashTypeMulti',
|
|
973
|
+
type: 'options',
|
|
974
|
+
default: 'phash',
|
|
975
|
+
description: 'Hash algorithm to compute (hash tool).',
|
|
814
976
|
options: [
|
|
815
|
-
{
|
|
816
|
-
{
|
|
817
|
-
{
|
|
818
|
-
displayName: 'Hash Type',
|
|
819
|
-
name: 'hashType',
|
|
820
|
-
type: 'options',
|
|
821
|
-
default: 'phash',
|
|
822
|
-
description: 'Hash algorithm to compute (hash tool).',
|
|
823
|
-
options: [
|
|
824
|
-
{ name: 'pHash', value: 'phash' },
|
|
825
|
-
{ name: 'MD5', value: 'md5' },
|
|
826
|
-
{ name: 'SHA1', value: 'sha1' },
|
|
827
|
-
],
|
|
828
|
-
},
|
|
829
|
-
{ displayName: 'Similarity Mode', name: 'similarityMode', type: 'string', default: '', description: 'Similarity mode (similarity tool).' },
|
|
830
|
-
{ displayName: 'Similarity Threshold', name: 'similarityThreshold', type: 'number', default: 0, description: 'Similarity threshold (similarity tool).' },
|
|
831
|
-
{ displayName: 'Quality Sample', name: 'qualitySample', type: 'number', default: 0, description: 'Sample size for quality analysis (quality tool).' },
|
|
832
|
-
{ displayName: 'Transparency Sample', name: 'transparencySample', type: 'number', default: 0, description: 'Sample size for transparency analysis (transparency tool).' },
|
|
833
|
-
{ displayName: 'Efficiency Format', name: 'efficiencyFormat', type: 'string', default: '', description: 'Output format for efficiency tool.' },
|
|
834
|
-
{ displayName: 'Efficiency Quality', name: 'efficiencyQuality', type: 'number', default: 0, description: 'Quality setting for efficiency tool.' },
|
|
977
|
+
{ name: 'pHash', value: 'phash' },
|
|
978
|
+
{ name: 'MD5', value: 'md5' },
|
|
979
|
+
{ name: 'SHA1', value: 'sha1' },
|
|
835
980
|
],
|
|
981
|
+
displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['hash'] } },
|
|
836
982
|
},
|
|
983
|
+
{
|
|
984
|
+
displayName: 'Similarity Tool',
|
|
985
|
+
name: 'similarityToolNoticeMulti',
|
|
986
|
+
type: 'notice',
|
|
987
|
+
default: '────────── Similarity tool ──────────',
|
|
988
|
+
description: 'Parameters for the Similarity tool.',
|
|
989
|
+
displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['similarity'] } },
|
|
990
|
+
},
|
|
991
|
+
{ displayName: 'Similarity Mode', name: 'similarityModeMulti', type: 'string', default: '', description: 'Similarity mode (similarity tool).', displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['similarity'] } } },
|
|
992
|
+
{ displayName: 'Similarity Threshold', name: 'similarityThresholdMulti', type: 'number', default: 0, description: 'Similarity threshold (similarity tool).', displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['similarity'] } } },
|
|
993
|
+
{
|
|
994
|
+
displayName: 'Quality Tool',
|
|
995
|
+
name: 'qualityToolNoticeMulti',
|
|
996
|
+
type: 'notice',
|
|
997
|
+
default: '────────── Quality tool ──────────',
|
|
998
|
+
description: 'Parameters for the Quality tool.',
|
|
999
|
+
displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['quality'] } },
|
|
1000
|
+
},
|
|
1001
|
+
{ displayName: 'Quality Sample', name: 'qualitySampleMulti', type: 'number', default: 0, description: 'Sample size for quality analysis.', displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['quality'] } } },
|
|
1002
|
+
{
|
|
1003
|
+
displayName: 'Transparency Tool',
|
|
1004
|
+
name: 'transparencyToolNoticeMulti',
|
|
1005
|
+
type: 'notice',
|
|
1006
|
+
default: '────────── Transparency tool ──────────',
|
|
1007
|
+
description: 'Parameters for the Transparency tool.',
|
|
1008
|
+
displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['transparency'] } },
|
|
1009
|
+
},
|
|
1010
|
+
{ displayName: 'Transparency Sample', name: 'transparencySampleMulti', type: 'number', default: 0, description: 'Sample size for transparency analysis.', displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['transparency'] } } },
|
|
1011
|
+
{
|
|
1012
|
+
displayName: 'Efficiency Tool',
|
|
1013
|
+
name: 'efficiencyToolNoticeMulti',
|
|
1014
|
+
type: 'notice',
|
|
1015
|
+
default: '────────── Efficiency tool ──────────',
|
|
1016
|
+
description: 'Parameters for the Efficiency tool.',
|
|
1017
|
+
displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['efficiency'] } },
|
|
1018
|
+
},
|
|
1019
|
+
{ displayName: 'Efficiency Format', name: 'efficiencyFormatMulti', type: 'string', default: '', description: 'Output format for efficiency tool.', displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['efficiency'] } } },
|
|
1020
|
+
{ displayName: 'Efficiency Quality', name: 'efficiencyQualityMulti', type: 'number', default: 0, description: 'Quality setting for efficiency tool.', displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['efficiency'] } } },
|
|
837
1021
|
],
|
|
838
1022
|
};
|
|
839
1023
|
async execute() {
|
|
@@ -1065,108 +1249,91 @@ class DavixH2I {
|
|
|
1065
1249
|
setBool('includeRawExif', this.getNodeParameter('includeRawExif', itemIndex));
|
|
1066
1250
|
break;
|
|
1067
1251
|
case 'multitask': {
|
|
1068
|
-
const
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
if (hasVal('pdfMode'))
|
|
1154
|
-
formData.pdfMode = String(getOpt('pdfMode'));
|
|
1155
|
-
if (hasVal('pdfPageSize'))
|
|
1156
|
-
formData.pdfPageSize = String(getOpt('pdfPageSize'));
|
|
1157
|
-
if (hasVal('pdfOrientation'))
|
|
1158
|
-
formData.pdfOrientation = String(getOpt('pdfOrientation'));
|
|
1159
|
-
if (hasVal('pdfMargin'))
|
|
1160
|
-
setNumber('pdfMargin', Number(getOpt('pdfMargin')));
|
|
1161
|
-
if (hasVal('pdfEmbedFormat'))
|
|
1162
|
-
formData.pdfEmbedFormat = String(getOpt('pdfEmbedFormat'));
|
|
1163
|
-
if (hasVal('pdfJpegQuality'))
|
|
1164
|
-
setNumber('pdfJpegQuality', Number(getOpt('pdfJpegQuality')));
|
|
1165
|
-
if (hasVal('includeRawExif'))
|
|
1166
|
-
setBool('includeRawExif', Boolean(getOpt('includeRawExif')));
|
|
1167
|
-
const watermarkProp = this.getNodeParameter('watermarkBinaryProperty', itemIndex, '');
|
|
1168
|
-
if (watermarkProp)
|
|
1169
|
-
await includeWatermarkFile(watermarkProp);
|
|
1252
|
+
const selectedActions = this.getNodeParameter('actions', itemIndex, []) || [];
|
|
1253
|
+
if (selectedActions.length === 0)
|
|
1254
|
+
throw new Error('Select at least one action for multitask.');
|
|
1255
|
+
const setNumberOnce = (name, value) => {
|
|
1256
|
+
if (value !== undefined && value !== null && value !== 0 && formData[name] === undefined)
|
|
1257
|
+
formData[name] = String(value);
|
|
1258
|
+
};
|
|
1259
|
+
const setStringOnce = (name, value) => {
|
|
1260
|
+
if (value && formData[name] === undefined)
|
|
1261
|
+
formData[name] = value;
|
|
1262
|
+
};
|
|
1263
|
+
const setBoolOnce = (name, value) => {
|
|
1264
|
+
if (value && formData[name] === undefined)
|
|
1265
|
+
formData[name] = toBoolString(value);
|
|
1266
|
+
};
|
|
1267
|
+
setStringOnce('format', this.getNodeParameter('multitaskFormat', itemIndex));
|
|
1268
|
+
setBoolOnce('keepMetadata', this.getNodeParameter('multitaskKeepMetadata', itemIndex));
|
|
1269
|
+
for (const a of selectedActions) {
|
|
1270
|
+
switch (a) {
|
|
1271
|
+
case 'format':
|
|
1272
|
+
setNumberOnce('width', this.getNodeParameter('formatWidth', itemIndex));
|
|
1273
|
+
setNumberOnce('height', this.getNodeParameter('formatHeight', itemIndex));
|
|
1274
|
+
break;
|
|
1275
|
+
case 'resize':
|
|
1276
|
+
setNumberOnce('width', this.getNodeParameter('resizeWidth', itemIndex));
|
|
1277
|
+
setNumberOnce('height', this.getNodeParameter('resizeHeight', itemIndex));
|
|
1278
|
+
setBoolOnce('enlarge', this.getNodeParameter('resizeEnlarge', itemIndex));
|
|
1279
|
+
setBoolOnce('normalizeOrientation', this.getNodeParameter('resizeNormalizeOrientation', itemIndex));
|
|
1280
|
+
break;
|
|
1281
|
+
case 'crop':
|
|
1282
|
+
setNumberOnce('cropX', this.getNodeParameter('cropXMulti', itemIndex));
|
|
1283
|
+
setNumberOnce('cropY', this.getNodeParameter('cropYMulti', itemIndex));
|
|
1284
|
+
setNumberOnce('cropWidth', this.getNodeParameter('cropWidthMulti', itemIndex));
|
|
1285
|
+
setNumberOnce('cropHeight', this.getNodeParameter('cropHeightMulti', itemIndex));
|
|
1286
|
+
setBoolOnce('normalizeOrientation', this.getNodeParameter('cropNormalizeOrientation', itemIndex));
|
|
1287
|
+
setStringOnce('backgroundColor', this.getNodeParameter('cropBackgroundColor', itemIndex));
|
|
1288
|
+
break;
|
|
1289
|
+
case 'transform':
|
|
1290
|
+
setNumberOnce('rotate', this.getNodeParameter('transformRotate', itemIndex));
|
|
1291
|
+
setBoolOnce('flipH', this.getNodeParameter('transformFlipH', itemIndex));
|
|
1292
|
+
setBoolOnce('flipV', this.getNodeParameter('transformFlipV', itemIndex));
|
|
1293
|
+
setStringOnce('colorSpace', this.getNodeParameter('transformColorSpace', itemIndex));
|
|
1294
|
+
break;
|
|
1295
|
+
case 'compress':
|
|
1296
|
+
setNumberOnce('quality', this.getNodeParameter('compressQuality', itemIndex));
|
|
1297
|
+
setNumberOnce('targetSizeKB', this.getNodeParameter('compressTargetSizeKB', itemIndex));
|
|
1298
|
+
setStringOnce('backgroundColor', this.getNodeParameter('compressBackgroundColor', itemIndex));
|
|
1299
|
+
setStringOnce('colorSpace', this.getNodeParameter('compressColorSpace', itemIndex));
|
|
1300
|
+
break;
|
|
1301
|
+
case 'enhance':
|
|
1302
|
+
setNumberOnce('blur', this.getNodeParameter('enhanceBlur', itemIndex));
|
|
1303
|
+
setNumberOnce('sharpen', this.getNodeParameter('enhanceSharpen', itemIndex));
|
|
1304
|
+
setBoolOnce('grayscale', this.getNodeParameter('enhanceGrayscale', itemIndex));
|
|
1305
|
+
setBoolOnce('sepia', this.getNodeParameter('enhanceSepia', itemIndex));
|
|
1306
|
+
setNumberOnce('brightness', this.getNodeParameter('enhanceBrightness', itemIndex));
|
|
1307
|
+
setNumberOnce('contrast', this.getNodeParameter('enhanceContrast', itemIndex));
|
|
1308
|
+
setNumberOnce('saturation', this.getNodeParameter('enhanceSaturation', itemIndex));
|
|
1309
|
+
setBoolOnce('normalizeOrientation', this.getNodeParameter('enhanceNormalizeOrientation', itemIndex));
|
|
1310
|
+
break;
|
|
1311
|
+
case 'frame':
|
|
1312
|
+
setNumberOnce('pad', this.getNodeParameter('framePad', itemIndex));
|
|
1313
|
+
setStringOnce('padColor', this.getNodeParameter('framePadColor', itemIndex));
|
|
1314
|
+
setNumberOnce('border', this.getNodeParameter('frameBorder', itemIndex));
|
|
1315
|
+
setStringOnce('borderColor', this.getNodeParameter('frameBorderColor', itemIndex));
|
|
1316
|
+
setNumberOnce('borderRadius', this.getNodeParameter('frameBorderRadius', itemIndex));
|
|
1317
|
+
break;
|
|
1318
|
+
case 'background':
|
|
1319
|
+
setStringOnce('backgroundColor', this.getNodeParameter('backgroundColorMulti', itemIndex));
|
|
1320
|
+
setNumberOnce('backgroundBlur', this.getNodeParameter('backgroundBlurMulti', itemIndex));
|
|
1321
|
+
setNumberOnce('borderRadius', this.getNodeParameter('backgroundBorderRadius', itemIndex));
|
|
1322
|
+
setStringOnce('padColor', this.getNodeParameter('backgroundPadColor', itemIndex));
|
|
1323
|
+
break;
|
|
1324
|
+
case 'watermark':
|
|
1325
|
+
setStringOnce('watermarkText', this.getNodeParameter('watermarkTextMulti', itemIndex));
|
|
1326
|
+
setNumberOnce('watermarkOpacity', this.getNodeParameter('watermarkOpacityMulti', itemIndex));
|
|
1327
|
+
formData.watermarkPosition =
|
|
1328
|
+
formData.watermarkPosition ?? this.getNodeParameter('watermarkPositionMulti', itemIndex);
|
|
1329
|
+
setNumberOnce('watermarkMargin', this.getNodeParameter('watermarkMarginMulti', itemIndex));
|
|
1330
|
+
setNumberOnce('watermarkScale', this.getNodeParameter('watermarkScaleMulti', itemIndex));
|
|
1331
|
+
setStringOnce('watermarkColor', this.getNodeParameter('watermarkColorMulti', itemIndex));
|
|
1332
|
+
setNumberOnce('watermarkFontSize', this.getNodeParameter('watermarkFontSizeMulti', itemIndex));
|
|
1333
|
+
await includeWatermarkFile(this.getNodeParameter('watermarkBinaryPropertyMulti', itemIndex));
|
|
1334
|
+
break;
|
|
1335
|
+
}
|
|
1336
|
+
}
|
|
1170
1337
|
break;
|
|
1171
1338
|
}
|
|
1172
1339
|
}
|
|
@@ -1323,41 +1490,65 @@ class DavixH2I {
|
|
|
1323
1490
|
selectedTools = tools;
|
|
1324
1491
|
formData.tools = tools.join(',');
|
|
1325
1492
|
}
|
|
1326
|
-
const toolOptions = this.getNodeParameter('options', itemIndex, {}) || {};
|
|
1327
|
-
const hasOpt = (key) => Object.prototype.hasOwnProperty.call(toolOptions, key);
|
|
1328
|
-
const getOpt = (key) => toolOptions[key];
|
|
1329
1493
|
const hasTool = (toolName) => selectedTools.includes(toolName);
|
|
1330
1494
|
if (hasTool('metadata')) {
|
|
1331
|
-
|
|
1332
|
-
|
|
1495
|
+
const includeRawExif = action === 'single'
|
|
1496
|
+
? this.getNodeParameter('includeRawExifSingle', itemIndex, false)
|
|
1497
|
+
: this.getNodeParameter('includeRawExifMulti', itemIndex, false);
|
|
1498
|
+
if (includeRawExif)
|
|
1499
|
+
setBool('includeRawExif', includeRawExif);
|
|
1333
1500
|
}
|
|
1334
1501
|
if (hasTool('palette')) {
|
|
1335
|
-
|
|
1336
|
-
|
|
1502
|
+
const paletteSize = action === 'single'
|
|
1503
|
+
? this.getNodeParameter('paletteSizeSingle', itemIndex, 0)
|
|
1504
|
+
: this.getNodeParameter('paletteSizeMulti', itemIndex, 0);
|
|
1505
|
+
if (paletteSize)
|
|
1506
|
+
setNumber('paletteSize', paletteSize);
|
|
1337
1507
|
}
|
|
1338
1508
|
if (hasTool('hash')) {
|
|
1339
|
-
|
|
1340
|
-
|
|
1509
|
+
const hashType = action === 'single'
|
|
1510
|
+
? this.getNodeParameter('hashTypeSingle', itemIndex)
|
|
1511
|
+
: this.getNodeParameter('hashTypeMulti', itemIndex);
|
|
1512
|
+
if (hashType)
|
|
1513
|
+
setString('hashType', hashType);
|
|
1341
1514
|
}
|
|
1342
1515
|
if (hasTool('quality')) {
|
|
1343
|
-
|
|
1344
|
-
|
|
1516
|
+
const qualitySample = action === 'single'
|
|
1517
|
+
? this.getNodeParameter('qualitySampleSingle', itemIndex, 0)
|
|
1518
|
+
: this.getNodeParameter('qualitySampleMulti', itemIndex, 0);
|
|
1519
|
+
if (qualitySample)
|
|
1520
|
+
setNumber('qualitySample', qualitySample);
|
|
1345
1521
|
}
|
|
1346
1522
|
if (hasTool('transparency')) {
|
|
1347
|
-
|
|
1348
|
-
|
|
1523
|
+
const transparencySample = action === 'single'
|
|
1524
|
+
? this.getNodeParameter('transparencySampleSingle', itemIndex, 0)
|
|
1525
|
+
: this.getNodeParameter('transparencySampleMulti', itemIndex, 0);
|
|
1526
|
+
if (transparencySample)
|
|
1527
|
+
setNumber('transparencySample', transparencySample);
|
|
1349
1528
|
}
|
|
1350
1529
|
if (hasTool('similarity')) {
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1530
|
+
const similarityMode = action === 'single'
|
|
1531
|
+
? this.getNodeParameter('similarityModeSingle', itemIndex, '')
|
|
1532
|
+
: this.getNodeParameter('similarityModeMulti', itemIndex, '');
|
|
1533
|
+
const similarityThreshold = action === 'single'
|
|
1534
|
+
? this.getNodeParameter('similarityThresholdSingle', itemIndex, 0)
|
|
1535
|
+
: this.getNodeParameter('similarityThresholdMulti', itemIndex, 0);
|
|
1536
|
+
if (similarityMode)
|
|
1537
|
+
setString('similarityMode', similarityMode);
|
|
1538
|
+
if (similarityThreshold)
|
|
1539
|
+
setNumber('similarityThreshold', similarityThreshold);
|
|
1355
1540
|
}
|
|
1356
1541
|
if (hasTool('efficiency')) {
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1542
|
+
const efficiencyFormat = action === 'single'
|
|
1543
|
+
? this.getNodeParameter('efficiencyFormatSingle', itemIndex, '')
|
|
1544
|
+
: this.getNodeParameter('efficiencyFormatMulti', itemIndex, '');
|
|
1545
|
+
const efficiencyQuality = action === 'single'
|
|
1546
|
+
? this.getNodeParameter('efficiencyQualitySingle', itemIndex, 0)
|
|
1547
|
+
: this.getNodeParameter('efficiencyQualityMulti', itemIndex, 0);
|
|
1548
|
+
if (efficiencyFormat)
|
|
1549
|
+
setString('efficiencyFormat', efficiencyFormat);
|
|
1550
|
+
if (efficiencyQuality)
|
|
1551
|
+
setNumber('efficiencyQuality', efficiencyQuality);
|
|
1361
1552
|
}
|
|
1362
1553
|
const response = await GenericFunctions_1.davixRequest.call(this, {
|
|
1363
1554
|
method: 'POST',
|