n8n-nodes-h2i 1.0.5 → 1.0.8
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 +469 -387
- package/package.json +1 -1
|
@@ -413,7 +413,7 @@ class DavixH2I {
|
|
|
413
413
|
name: 'actions',
|
|
414
414
|
type: 'multiOptions',
|
|
415
415
|
default: [],
|
|
416
|
-
description: 'Select one or more actions
|
|
416
|
+
description: 'Select one or more actions. Each action reveals its own parameter group below.',
|
|
417
417
|
displayOptions: { show: { resource: ['image'], operation: ['multitask'] } },
|
|
418
418
|
options: [
|
|
419
419
|
{ name: 'Format', value: 'format' },
|
|
@@ -442,7 +442,13 @@ class DavixH2I {
|
|
|
442
442
|
{ name: 'SVG', value: 'svg' },
|
|
443
443
|
{ name: 'PDF', value: 'pdf' },
|
|
444
444
|
],
|
|
445
|
-
displayOptions: {
|
|
445
|
+
displayOptions: {
|
|
446
|
+
show: {
|
|
447
|
+
resource: ['image'],
|
|
448
|
+
operation: ['multitask'],
|
|
449
|
+
actions: ['format', 'resize', 'crop', 'transform', 'compress', 'enhance', 'frame', 'background', 'watermark'],
|
|
450
|
+
},
|
|
451
|
+
},
|
|
446
452
|
},
|
|
447
453
|
{
|
|
448
454
|
displayName: 'Keep Metadata',
|
|
@@ -450,189 +456,164 @@ class DavixH2I {
|
|
|
450
456
|
type: 'boolean',
|
|
451
457
|
default: false,
|
|
452
458
|
description: 'Preserve EXIF/metadata for the multitask request when possible.',
|
|
453
|
-
displayOptions: {
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
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
|
-
],
|
|
549
|
-
displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['compress'] } },
|
|
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'] } },
|
|
459
|
+
displayOptions: {
|
|
460
|
+
show: {
|
|
461
|
+
resource: ['image'],
|
|
462
|
+
operation: ['multitask'],
|
|
463
|
+
actions: ['format', 'resize', 'crop', 'transform', 'compress', 'enhance', 'frame', 'background', 'watermark'],
|
|
464
|
+
},
|
|
465
|
+
},
|
|
606
466
|
},
|
|
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
467
|
{
|
|
610
|
-
displayName: '
|
|
611
|
-
name: '
|
|
612
|
-
type: '
|
|
613
|
-
default:
|
|
614
|
-
|
|
468
|
+
displayName: 'Action Parameters',
|
|
469
|
+
name: 'imageActionParams',
|
|
470
|
+
type: 'fixedCollection',
|
|
471
|
+
default: {},
|
|
472
|
+
placeholder: 'Add action parameters',
|
|
473
|
+
description: 'Parameters for each selected action.',
|
|
474
|
+
typeOptions: { multipleValues: false },
|
|
475
|
+
displayOptions: { show: { resource: ['image'], operation: ['multitask'] } },
|
|
615
476
|
options: [
|
|
616
|
-
{
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
477
|
+
{
|
|
478
|
+
name: 'format',
|
|
479
|
+
displayName: 'Format',
|
|
480
|
+
values: [
|
|
481
|
+
{ displayName: 'Width', name: 'formatWidthMulti', type: 'number', default: 0, description: 'Resize width in pixels for format.' },
|
|
482
|
+
{ displayName: 'Height', name: 'formatHeightMulti', type: 'number', default: 0, description: 'Resize height in pixels for format.' },
|
|
483
|
+
],
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
name: 'resize',
|
|
487
|
+
displayName: 'Resize',
|
|
488
|
+
values: [
|
|
489
|
+
{ displayName: 'Width', name: 'resizeWidthMulti', type: 'number', default: 0, description: 'Resize width in pixels.' },
|
|
490
|
+
{ displayName: 'Height', name: 'resizeHeightMulti', type: 'number', default: 0, description: 'Resize height in pixels.' },
|
|
491
|
+
{ displayName: 'Enlarge', name: 'resizeEnlargeMulti', type: 'boolean', default: false, description: 'Allow upscaling when resizing.' },
|
|
492
|
+
{ displayName: 'Normalize Orientation', name: 'resizeNormalizeOrientationMulti', type: 'boolean', default: false, description: 'Auto-rotate based on EXIF orientation.' },
|
|
493
|
+
],
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
name: 'crop',
|
|
497
|
+
displayName: 'Crop',
|
|
498
|
+
values: [
|
|
499
|
+
{ displayName: 'Crop X', name: 'cropXMulti', type: 'number', default: 0, description: 'Left offset for crop.' },
|
|
500
|
+
{ displayName: 'Crop Y', name: 'cropYMulti', type: 'number', default: 0, description: 'Top offset for crop.' },
|
|
501
|
+
{ displayName: 'Crop Width', name: 'cropWidthMulti', type: 'number', default: 0, description: 'Crop width in pixels.' },
|
|
502
|
+
{ displayName: 'Crop Height', name: 'cropHeightMulti', type: 'number', default: 0, description: 'Crop height in pixels.' },
|
|
503
|
+
{ displayName: 'Normalize Orientation', name: 'cropNormalizeOrientationMulti', type: 'boolean', default: false, description: 'Auto-rotate before cropping based on EXIF orientation.' },
|
|
504
|
+
{ displayName: 'Background Color', name: 'cropBackgroundColorMulti', type: 'string', default: '', description: 'Background color used when the crop exceeds bounds.' },
|
|
505
|
+
],
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
name: 'transform',
|
|
509
|
+
displayName: 'Transform',
|
|
510
|
+
values: [
|
|
511
|
+
{ displayName: 'Rotate (degrees)', name: 'transformRotateMulti', type: 'number', default: 0, description: 'Rotate image by degrees.' },
|
|
512
|
+
{ displayName: 'Flip Horizontal', name: 'transformFlipHMulti', type: 'boolean', default: false, description: 'Flip image horizontally.' },
|
|
513
|
+
{ displayName: 'Flip Vertical', name: 'transformFlipVMulti', type: 'boolean', default: false, description: 'Flip image vertically.' },
|
|
514
|
+
{
|
|
515
|
+
displayName: 'Color Space',
|
|
516
|
+
name: 'transformColorSpaceMulti',
|
|
517
|
+
type: 'options',
|
|
518
|
+
default: 'srgb',
|
|
519
|
+
description: 'Color space to use for transforms.',
|
|
520
|
+
options: [
|
|
521
|
+
{ name: 'sRGB', value: 'srgb' },
|
|
522
|
+
{ name: 'Display P3', value: 'display-p3' },
|
|
523
|
+
],
|
|
524
|
+
},
|
|
525
|
+
],
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
name: 'compress',
|
|
529
|
+
displayName: 'Compress',
|
|
530
|
+
values: [
|
|
531
|
+
{ displayName: 'Quality', name: 'compressQualityMulti', type: 'number', default: 82, description: 'Output quality (1-100).' },
|
|
532
|
+
{ displayName: 'Target Size (KB)', name: 'compressTargetSizeKBMulti', type: 'number', default: 0, description: 'Target compressed size in KB.' },
|
|
533
|
+
{ displayName: 'Background Color', name: 'compressBackgroundColorMulti', type: 'string', default: '', description: 'Background color used for compression fills.' },
|
|
534
|
+
{
|
|
535
|
+
displayName: 'Color Space',
|
|
536
|
+
name: 'compressColorSpaceMulti',
|
|
537
|
+
type: 'options',
|
|
538
|
+
default: 'srgb',
|
|
539
|
+
description: 'Color space to use for compression.',
|
|
540
|
+
options: [
|
|
541
|
+
{ name: 'sRGB', value: 'srgb' },
|
|
542
|
+
{ name: 'Display P3', value: 'display-p3' },
|
|
543
|
+
],
|
|
544
|
+
},
|
|
545
|
+
],
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
name: 'enhance',
|
|
549
|
+
displayName: 'Enhance',
|
|
550
|
+
values: [
|
|
551
|
+
{ displayName: 'Blur', name: 'enhanceBlurMulti', type: 'number', default: 0, description: 'Blur radius.' },
|
|
552
|
+
{ displayName: 'Sharpen', name: 'enhanceSharpenMulti', type: 'number', default: 0, description: 'Sharpen amount.' },
|
|
553
|
+
{ displayName: 'Grayscale', name: 'enhanceGrayscaleMulti', type: 'boolean', default: false, description: 'Convert to grayscale.' },
|
|
554
|
+
{ displayName: 'Sepia', name: 'enhanceSepiaMulti', type: 'boolean', default: false, description: 'Apply sepia tone.' },
|
|
555
|
+
{ displayName: 'Brightness', name: 'enhanceBrightnessMulti', type: 'number', default: 0, description: 'Brightness adjustment (-100 to 100).' },
|
|
556
|
+
{ displayName: 'Contrast', name: 'enhanceContrastMulti', type: 'number', default: 0, description: 'Contrast adjustment (-100 to 100).' },
|
|
557
|
+
{ displayName: 'Saturation', name: 'enhanceSaturationMulti', type: 'number', default: 0, description: 'Saturation adjustment (-100 to 100).' },
|
|
558
|
+
{ displayName: 'Normalize Orientation', name: 'enhanceNormalizeOrientationMulti', type: 'boolean', default: false, description: 'Auto-rotate based on EXIF orientation before enhancing.' },
|
|
559
|
+
],
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
name: 'frame',
|
|
563
|
+
displayName: 'Frame',
|
|
564
|
+
values: [
|
|
565
|
+
{ displayName: 'Pad', name: 'framePadMulti', type: 'number', default: 0, description: 'Uniform padding size.' },
|
|
566
|
+
{ displayName: 'Pad Color', name: 'framePadColorMulti', type: 'string', default: '', description: 'Padding color (e.g. #ffffff).' },
|
|
567
|
+
{ displayName: 'Border', name: 'frameBorderMulti', type: 'number', default: 0, description: 'Border thickness in pixels.' },
|
|
568
|
+
{ displayName: 'Border Color', name: 'frameBorderColorMulti', type: 'string', default: '', description: 'Border color (e.g. #000000).' },
|
|
569
|
+
{ displayName: 'Border Radius', name: 'frameBorderRadiusMulti', type: 'number', default: 0, description: 'Rounded corner radius.' },
|
|
570
|
+
],
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
name: 'background',
|
|
574
|
+
displayName: 'Background',
|
|
575
|
+
values: [
|
|
576
|
+
{ displayName: 'Background Color', name: 'backgroundColorMulti', type: 'string', default: '', description: 'Background color to apply.' },
|
|
577
|
+
{ displayName: 'Background Blur', name: 'backgroundBlurMulti', type: 'number', default: 0, description: 'Blur background by this radius.' },
|
|
578
|
+
{ displayName: 'Border Radius', name: 'backgroundBorderRadiusMulti', type: 'number', default: 0, description: 'Rounded corner radius.' },
|
|
579
|
+
{ displayName: 'Pad Color', name: 'backgroundPadColorMulti', type: 'string', default: '', description: 'Padding color for background.' },
|
|
580
|
+
],
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
name: 'watermark',
|
|
584
|
+
displayName: 'Watermark',
|
|
585
|
+
values: [
|
|
586
|
+
{ displayName: 'Watermark Text', name: 'watermarkTextMulti', type: 'string', default: '', description: 'Text watermark content.' },
|
|
587
|
+
{ displayName: 'Watermark Opacity', name: 'watermarkOpacityMulti', type: 'number', default: 0.35, description: 'Watermark opacity (0-1).' },
|
|
588
|
+
{
|
|
589
|
+
displayName: 'Watermark Position',
|
|
590
|
+
name: 'watermarkPositionMulti',
|
|
591
|
+
type: 'options',
|
|
592
|
+
default: 'center',
|
|
593
|
+
description: 'Placement for watermark.',
|
|
594
|
+
options: [
|
|
595
|
+
{ name: 'Center', value: 'center' },
|
|
596
|
+
{ name: 'Top Left', value: 'top-left' },
|
|
597
|
+
{ name: 'Top Right', value: 'top-right' },
|
|
598
|
+
{ name: 'Bottom Left', value: 'bottom-left' },
|
|
599
|
+
{ name: 'Bottom Right', value: 'bottom-right' },
|
|
600
|
+
],
|
|
601
|
+
},
|
|
602
|
+
{ displayName: 'Watermark Margin', name: 'watermarkMarginMulti', type: 'number', default: 8, description: 'Margin/padding around watermark.' },
|
|
603
|
+
{ displayName: 'Watermark Scale', name: 'watermarkScaleMulti', type: 'number', default: 1, description: 'Scale factor for watermark.' },
|
|
604
|
+
{ displayName: 'Watermark Color', name: 'watermarkColorMulti', type: 'string', default: '#000000', description: 'Color for text watermark.' },
|
|
605
|
+
{ displayName: 'Watermark Font Size', name: 'watermarkFontSizeMulti', type: 'number', default: 24, description: 'Font size for text watermark.' },
|
|
606
|
+
{
|
|
607
|
+
displayName: 'Watermark Image Binary Property',
|
|
608
|
+
name: 'watermarkImageBinaryProperty',
|
|
609
|
+
type: 'string',
|
|
610
|
+
default: '',
|
|
611
|
+
placeholder: 'watermarkImage',
|
|
612
|
+
description: 'Binary property containing an image watermark (optional).',
|
|
613
|
+
},
|
|
614
|
+
],
|
|
615
|
+
},
|
|
621
616
|
],
|
|
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'] } } },
|
|
628
|
-
{
|
|
629
|
-
displayName: 'Watermark Image Binary Property',
|
|
630
|
-
name: 'watermarkBinaryPropertyMulti',
|
|
631
|
-
type: 'string',
|
|
632
|
-
default: '',
|
|
633
|
-
placeholder: 'watermarkImage',
|
|
634
|
-
description: 'Binary property containing an image watermark (optional).',
|
|
635
|
-
displayOptions: { show: { resource: ['image'], operation: ['multitask'], actions: ['watermark'] } },
|
|
636
617
|
},
|
|
637
618
|
{
|
|
638
619
|
displayName: 'Download Result(s) as Binary',
|
|
@@ -851,134 +832,212 @@ class DavixH2I {
|
|
|
851
832
|
displayOptions: { show: { resource: ['tools'], operation: ['multitask'] } },
|
|
852
833
|
},
|
|
853
834
|
{
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
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).',
|
|
835
|
+
// Single-tool parameters grouped to keep property keys unique
|
|
836
|
+
displayName: 'Tool Parameters (Single)',
|
|
837
|
+
name: 'toolParametersSingle',
|
|
838
|
+
type: 'fixedCollection',
|
|
839
|
+
default: {},
|
|
840
|
+
placeholder: 'Add tool parameters',
|
|
841
|
+
description: 'Parameters for the selected tool.',
|
|
842
|
+
typeOptions: { multipleValues: false },
|
|
843
|
+
displayOptions: { show: { resource: ['tools'], operation: ['single'] } },
|
|
892
844
|
options: [
|
|
893
|
-
{
|
|
894
|
-
|
|
895
|
-
|
|
845
|
+
{
|
|
846
|
+
name: 'metadata',
|
|
847
|
+
displayName: 'Metadata',
|
|
848
|
+
values: [{ displayName: 'Include Raw EXIF', name: 'metadataIncludeRawExifSingle', type: 'boolean', default: false, description: 'Include raw EXIF data when available.' }],
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
name: 'palette',
|
|
852
|
+
displayName: 'Palette',
|
|
853
|
+
values: [{ displayName: 'Palette Size', name: 'paletteSizeSingle', type: 'number', default: 5, description: 'Number of colors to extract.' }],
|
|
854
|
+
},
|
|
855
|
+
{
|
|
856
|
+
name: 'hash',
|
|
857
|
+
displayName: 'Hash',
|
|
858
|
+
values: [
|
|
859
|
+
{
|
|
860
|
+
displayName: 'Hash Type',
|
|
861
|
+
name: 'hashTypeSingle',
|
|
862
|
+
type: 'options',
|
|
863
|
+
default: 'phash',
|
|
864
|
+
description: 'Hash algorithm to compute.',
|
|
865
|
+
options: [
|
|
866
|
+
{ name: 'pHash', value: 'phash' },
|
|
867
|
+
{ name: 'MD5', value: 'md5' },
|
|
868
|
+
{ name: 'SHA1', value: 'sha1' },
|
|
869
|
+
],
|
|
870
|
+
},
|
|
871
|
+
],
|
|
872
|
+
},
|
|
873
|
+
{
|
|
874
|
+
name: 'similarity',
|
|
875
|
+
displayName: 'Similarity',
|
|
876
|
+
values: [
|
|
877
|
+
{ displayName: 'Similarity Mode', name: 'similarityModeSingle', type: 'string', default: '', description: 'Similarity mode.' },
|
|
878
|
+
{ displayName: 'Similarity Threshold', name: 'similarityThresholdSingle', type: 'number', default: 0, description: 'Similarity threshold.' },
|
|
879
|
+
],
|
|
880
|
+
},
|
|
881
|
+
{
|
|
882
|
+
name: 'quality',
|
|
883
|
+
displayName: 'Quality',
|
|
884
|
+
values: [{ displayName: 'Quality Sample', name: 'qualitySampleSingle', type: 'number', default: 0, description: 'Sample size for quality analysis.' }],
|
|
885
|
+
},
|
|
886
|
+
{
|
|
887
|
+
name: 'transparency',
|
|
888
|
+
displayName: 'Transparency',
|
|
889
|
+
values: [{ displayName: 'Transparency Sample', name: 'transparencySampleSingle', type: 'number', default: 0, description: 'Sample size for transparency analysis.' }],
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
name: 'efficiency',
|
|
893
|
+
displayName: 'Efficiency',
|
|
894
|
+
values: [
|
|
895
|
+
{ displayName: 'Efficiency Format', name: 'efficiencyFormatSingle', type: 'string', default: '', description: 'Output format for efficiency tool.' },
|
|
896
|
+
{ displayName: 'Efficiency Quality', name: 'efficiencyQualitySingle', type: 'number', default: 0, description: 'Quality setting for efficiency tool.' },
|
|
897
|
+
],
|
|
898
|
+
},
|
|
896
899
|
],
|
|
897
|
-
displayOptions: { show: { resource: ['tools'], operation: ['single'], tool: ['hash'] } },
|
|
898
|
-
},
|
|
899
|
-
{
|
|
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
900
|
},
|
|
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
901
|
{
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
902
|
+
// Multitask tool parameters grouped to keep property keys unique
|
|
903
|
+
displayName: 'Tool Parameters (Multitask)',
|
|
904
|
+
name: 'toolParametersMulti',
|
|
905
|
+
type: 'fixedCollection',
|
|
906
|
+
default: {},
|
|
907
|
+
placeholder: 'Add tool parameters',
|
|
908
|
+
description: 'Parameters for selected tools in multitask.',
|
|
909
|
+
typeOptions: { multipleValues: false },
|
|
910
|
+
displayOptions: { show: { resource: ['tools'], operation: ['multitask'] } },
|
|
911
|
+
options: [
|
|
912
|
+
{
|
|
913
|
+
name: 'metadata',
|
|
914
|
+
displayName: 'Metadata',
|
|
915
|
+
values: [{ displayName: 'Include Raw EXIF', name: 'metadataIncludeRawExifMulti', type: 'boolean', default: false, description: 'Include raw EXIF data when available.' }],
|
|
916
|
+
},
|
|
917
|
+
{
|
|
918
|
+
name: 'palette',
|
|
919
|
+
displayName: 'Palette',
|
|
920
|
+
values: [{ displayName: 'Palette Size', name: 'paletteSizeMulti', type: 'number', default: 5, description: 'Number of colors to extract.' }],
|
|
921
|
+
},
|
|
922
|
+
{
|
|
923
|
+
name: 'hash',
|
|
924
|
+
displayName: 'Hash',
|
|
925
|
+
values: [
|
|
926
|
+
{
|
|
927
|
+
displayName: 'Hash Type',
|
|
928
|
+
name: 'hashTypeMulti',
|
|
929
|
+
type: 'options',
|
|
930
|
+
default: 'phash',
|
|
931
|
+
description: 'Hash algorithm to compute.',
|
|
932
|
+
options: [
|
|
933
|
+
{ name: 'pHash', value: 'phash' },
|
|
934
|
+
{ name: 'MD5', value: 'md5' },
|
|
935
|
+
{ name: 'SHA1', value: 'sha1' },
|
|
936
|
+
],
|
|
937
|
+
},
|
|
938
|
+
],
|
|
939
|
+
},
|
|
940
|
+
{
|
|
941
|
+
name: 'similarity',
|
|
942
|
+
displayName: 'Similarity',
|
|
943
|
+
values: [
|
|
944
|
+
{ displayName: 'Similarity Mode', name: 'similarityModeMulti', type: 'string', default: '', description: 'Similarity mode.' },
|
|
945
|
+
{ displayName: 'Similarity Threshold', name: 'similarityThresholdMulti', type: 'number', default: 0, description: 'Similarity threshold.' },
|
|
946
|
+
],
|
|
947
|
+
},
|
|
948
|
+
{
|
|
949
|
+
name: 'quality',
|
|
950
|
+
displayName: 'Quality',
|
|
951
|
+
values: [{ displayName: 'Quality Sample', name: 'qualitySampleMulti', type: 'number', default: 0, description: 'Sample size for quality analysis.' }],
|
|
952
|
+
},
|
|
953
|
+
{
|
|
954
|
+
name: 'transparency',
|
|
955
|
+
displayName: 'Transparency',
|
|
956
|
+
values: [{ displayName: 'Transparency Sample', name: 'transparencySampleMulti', type: 'number', default: 0, description: 'Sample size for transparency analysis.' }],
|
|
957
|
+
},
|
|
958
|
+
{
|
|
959
|
+
name: 'efficiency',
|
|
960
|
+
displayName: 'Efficiency',
|
|
961
|
+
values: [
|
|
962
|
+
{ displayName: 'Efficiency Format', name: 'efficiencyFormatMulti', type: 'string', default: '', description: 'Output format for efficiency tool.' },
|
|
963
|
+
{ displayName: 'Efficiency Quality', name: 'efficiencyQualityMulti', type: 'number', default: 0, description: 'Quality setting for efficiency tool.' },
|
|
964
|
+
],
|
|
965
|
+
},
|
|
966
|
+
],
|
|
944
967
|
},
|
|
945
968
|
{
|
|
946
|
-
displayName: '
|
|
947
|
-
name: '
|
|
948
|
-
type: '
|
|
949
|
-
default:
|
|
950
|
-
|
|
951
|
-
|
|
969
|
+
displayName: 'Similarity Parameters (Multitask)',
|
|
970
|
+
name: 'similarityParametersMulti',
|
|
971
|
+
type: 'fixedCollection',
|
|
972
|
+
default: {},
|
|
973
|
+
placeholder: 'Add similarity parameters',
|
|
974
|
+
description: 'Similarity tool options for multitask.',
|
|
975
|
+
typeOptions: { multipleValues: false },
|
|
976
|
+
displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['similarity'] } },
|
|
977
|
+
options: [
|
|
978
|
+
{
|
|
979
|
+
name: 'parameters',
|
|
980
|
+
displayName: 'Parameters',
|
|
981
|
+
values: [
|
|
982
|
+
{ displayName: 'Similarity Mode', name: 'similarityMode', type: 'string', default: '', description: 'Similarity mode.' },
|
|
983
|
+
{ displayName: 'Similarity Threshold', name: 'similarityThreshold', type: 'number', default: 0, description: 'Similarity threshold.' },
|
|
984
|
+
],
|
|
985
|
+
},
|
|
986
|
+
],
|
|
952
987
|
},
|
|
953
988
|
{
|
|
954
|
-
displayName: '
|
|
955
|
-
name: '
|
|
956
|
-
type: '
|
|
957
|
-
default:
|
|
958
|
-
|
|
959
|
-
|
|
989
|
+
displayName: 'Quality Parameters (Multitask)',
|
|
990
|
+
name: 'qualityParametersMulti',
|
|
991
|
+
type: 'fixedCollection',
|
|
992
|
+
default: {},
|
|
993
|
+
placeholder: 'Add quality parameters',
|
|
994
|
+
description: 'Quality tool options for multitask.',
|
|
995
|
+
typeOptions: { multipleValues: false },
|
|
996
|
+
displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['quality'] } },
|
|
997
|
+
options: [
|
|
998
|
+
{
|
|
999
|
+
name: 'parameters',
|
|
1000
|
+
displayName: 'Parameters',
|
|
1001
|
+
values: [{ displayName: 'Quality Sample', name: 'qualitySample', type: 'number', default: 0, description: 'Sample size for quality analysis.' }],
|
|
1002
|
+
},
|
|
1003
|
+
],
|
|
960
1004
|
},
|
|
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
1005
|
{
|
|
963
|
-
displayName: '
|
|
964
|
-
name: '
|
|
965
|
-
type: '
|
|
966
|
-
default:
|
|
967
|
-
|
|
968
|
-
|
|
1006
|
+
displayName: 'Transparency Parameters (Multitask)',
|
|
1007
|
+
name: 'transparencyParametersMulti',
|
|
1008
|
+
type: 'fixedCollection',
|
|
1009
|
+
default: {},
|
|
1010
|
+
placeholder: 'Add transparency parameters',
|
|
1011
|
+
description: 'Transparency tool options for multitask.',
|
|
1012
|
+
typeOptions: { multipleValues: false },
|
|
1013
|
+
displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['transparency'] } },
|
|
1014
|
+
options: [
|
|
1015
|
+
{
|
|
1016
|
+
name: 'parameters',
|
|
1017
|
+
displayName: 'Parameters',
|
|
1018
|
+
values: [{ displayName: 'Transparency Sample', name: 'transparencySample', type: 'number', default: 0, description: 'Sample size for transparency analysis.' }],
|
|
1019
|
+
},
|
|
1020
|
+
],
|
|
969
1021
|
},
|
|
970
1022
|
{
|
|
971
|
-
displayName: '
|
|
972
|
-
name: '
|
|
973
|
-
type: '
|
|
974
|
-
default:
|
|
975
|
-
|
|
1023
|
+
displayName: 'Efficiency Parameters (Multitask)',
|
|
1024
|
+
name: 'efficiencyParametersMulti',
|
|
1025
|
+
type: 'fixedCollection',
|
|
1026
|
+
default: {},
|
|
1027
|
+
placeholder: 'Add efficiency parameters',
|
|
1028
|
+
description: 'Efficiency tool options for multitask.',
|
|
1029
|
+
typeOptions: { multipleValues: false },
|
|
1030
|
+
displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['efficiency'] } },
|
|
976
1031
|
options: [
|
|
977
|
-
{
|
|
978
|
-
|
|
979
|
-
|
|
1032
|
+
{
|
|
1033
|
+
name: 'parameters',
|
|
1034
|
+
displayName: 'Parameters',
|
|
1035
|
+
values: [
|
|
1036
|
+
{ displayName: 'Efficiency Format', name: 'efficiencyFormat', type: 'string', default: '', description: 'Output format for efficiency tool.' },
|
|
1037
|
+
{ displayName: 'Efficiency Quality', name: 'efficiencyQuality', type: 'number', default: 0, description: 'Quality setting for efficiency tool.' },
|
|
1038
|
+
],
|
|
1039
|
+
},
|
|
980
1040
|
],
|
|
981
|
-
displayOptions: { show: { resource: ['tools'], operation: ['multitask'], tools: ['hash'] } },
|
|
982
1041
|
},
|
|
983
1042
|
{
|
|
984
1043
|
displayName: 'Similarity Tool',
|
|
@@ -1261,7 +1320,7 @@ class DavixH2I {
|
|
|
1261
1320
|
formData[name] = value;
|
|
1262
1321
|
};
|
|
1263
1322
|
const setBoolOnce = (name, value) => {
|
|
1264
|
-
if (value && formData[name] === undefined)
|
|
1323
|
+
if (value !== undefined && value !== null && formData[name] === undefined)
|
|
1265
1324
|
formData[name] = toBoolString(value);
|
|
1266
1325
|
};
|
|
1267
1326
|
setStringOnce('format', this.getNodeParameter('multitaskFormat', itemIndex));
|
|
@@ -1269,68 +1328,94 @@ class DavixH2I {
|
|
|
1269
1328
|
for (const a of selectedActions) {
|
|
1270
1329
|
switch (a) {
|
|
1271
1330
|
case 'format':
|
|
1272
|
-
|
|
1273
|
-
|
|
1331
|
+
{
|
|
1332
|
+
const params = this.getNodeParameter('imageActionParams.format', itemIndex, {}) || {};
|
|
1333
|
+
setNumberOnce('width', Number(params.formatWidthMulti ?? 0));
|
|
1334
|
+
setNumberOnce('height', Number(params.formatHeightMulti ?? 0));
|
|
1335
|
+
}
|
|
1274
1336
|
break;
|
|
1275
1337
|
case 'resize':
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1338
|
+
{
|
|
1339
|
+
const params = this.getNodeParameter('imageActionParams.resize', itemIndex, {}) || {};
|
|
1340
|
+
setNumberOnce('width', Number(params.resizeWidthMulti ?? 0));
|
|
1341
|
+
setNumberOnce('height', Number(params.resizeHeightMulti ?? 0));
|
|
1342
|
+
setBoolOnce('enlarge', Boolean(params.resizeEnlargeMulti));
|
|
1343
|
+
setBoolOnce('normalizeOrientation', Boolean(params.resizeNormalizeOrientationMulti));
|
|
1344
|
+
}
|
|
1280
1345
|
break;
|
|
1281
1346
|
case 'crop':
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1347
|
+
{
|
|
1348
|
+
const params = this.getNodeParameter('imageActionParams.crop', itemIndex, {}) || {};
|
|
1349
|
+
setNumberOnce('cropX', Number(params.cropXMulti ?? 0));
|
|
1350
|
+
setNumberOnce('cropY', Number(params.cropYMulti ?? 0));
|
|
1351
|
+
setNumberOnce('cropWidth', Number(params.cropWidthMulti ?? 0));
|
|
1352
|
+
setNumberOnce('cropHeight', Number(params.cropHeightMulti ?? 0));
|
|
1353
|
+
setBoolOnce('normalizeOrientation', Boolean(params.cropNormalizeOrientationMulti));
|
|
1354
|
+
setStringOnce('backgroundColor', String(params.cropBackgroundColorMulti ?? ''));
|
|
1355
|
+
}
|
|
1288
1356
|
break;
|
|
1289
1357
|
case 'transform':
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1358
|
+
{
|
|
1359
|
+
const params = this.getNodeParameter('imageActionParams.transform', itemIndex, {}) || {};
|
|
1360
|
+
setNumberOnce('rotate', Number(params.transformRotateMulti ?? 0));
|
|
1361
|
+
setBoolOnce('flipH', Boolean(params.transformFlipHMulti));
|
|
1362
|
+
setBoolOnce('flipV', Boolean(params.transformFlipVMulti));
|
|
1363
|
+
setStringOnce('colorSpace', String(params.transformColorSpaceMulti ?? ''));
|
|
1364
|
+
}
|
|
1294
1365
|
break;
|
|
1295
1366
|
case 'compress':
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1367
|
+
{
|
|
1368
|
+
const params = this.getNodeParameter('imageActionParams.compress', itemIndex, {}) || {};
|
|
1369
|
+
setNumberOnce('quality', Number(params.compressQualityMulti ?? 0));
|
|
1370
|
+
setNumberOnce('targetSizeKB', Number(params.compressTargetSizeKBMulti ?? 0));
|
|
1371
|
+
setStringOnce('backgroundColor', String(params.compressBackgroundColorMulti ?? ''));
|
|
1372
|
+
setStringOnce('colorSpace', String(params.compressColorSpaceMulti ?? ''));
|
|
1373
|
+
}
|
|
1300
1374
|
break;
|
|
1301
1375
|
case 'enhance':
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1376
|
+
{
|
|
1377
|
+
const params = this.getNodeParameter('imageActionParams.enhance', itemIndex, {}) || {};
|
|
1378
|
+
setNumberOnce('blur', Number(params.enhanceBlurMulti ?? 0));
|
|
1379
|
+
setNumberOnce('sharpen', Number(params.enhanceSharpenMulti ?? 0));
|
|
1380
|
+
setBoolOnce('grayscale', Boolean(params.enhanceGrayscaleMulti));
|
|
1381
|
+
setBoolOnce('sepia', Boolean(params.enhanceSepiaMulti));
|
|
1382
|
+
setNumberOnce('brightness', Number(params.enhanceBrightnessMulti ?? 0));
|
|
1383
|
+
setNumberOnce('contrast', Number(params.enhanceContrastMulti ?? 0));
|
|
1384
|
+
setNumberOnce('saturation', Number(params.enhanceSaturationMulti ?? 0));
|
|
1385
|
+
setBoolOnce('normalizeOrientation', Boolean(params.enhanceNormalizeOrientationMulti));
|
|
1386
|
+
}
|
|
1310
1387
|
break;
|
|
1311
1388
|
case 'frame':
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1389
|
+
{
|
|
1390
|
+
const params = this.getNodeParameter('imageActionParams.frame', itemIndex, {}) || {};
|
|
1391
|
+
setNumberOnce('pad', Number(params.framePadMulti ?? 0));
|
|
1392
|
+
setStringOnce('padColor', String(params.framePadColorMulti ?? ''));
|
|
1393
|
+
setNumberOnce('border', Number(params.frameBorderMulti ?? 0));
|
|
1394
|
+
setStringOnce('borderColor', String(params.frameBorderColorMulti ?? ''));
|
|
1395
|
+
setNumberOnce('borderRadius', Number(params.frameBorderRadiusMulti ?? 0));
|
|
1396
|
+
}
|
|
1317
1397
|
break;
|
|
1318
1398
|
case 'background':
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1399
|
+
{
|
|
1400
|
+
const params = this.getNodeParameter('imageActionParams.background', itemIndex, {}) || {};
|
|
1401
|
+
setStringOnce('backgroundColor', String(params.backgroundColorMulti ?? ''));
|
|
1402
|
+
setNumberOnce('backgroundBlur', Number(params.backgroundBlurMulti ?? 0));
|
|
1403
|
+
setNumberOnce('borderRadius', Number(params.backgroundBorderRadiusMulti ?? 0));
|
|
1404
|
+
setStringOnce('padColor', String(params.backgroundPadColorMulti ?? ''));
|
|
1405
|
+
}
|
|
1323
1406
|
break;
|
|
1324
1407
|
case 'watermark':
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1408
|
+
{
|
|
1409
|
+
const params = this.getNodeParameter('imageActionParams.watermark', itemIndex, {}) || {};
|
|
1410
|
+
setStringOnce('watermarkText', String(params.watermarkTextMulti ?? ''));
|
|
1411
|
+
setNumberOnce('watermarkOpacity', Number(params.watermarkOpacityMulti ?? 0));
|
|
1412
|
+
formData.watermarkPosition = formData.watermarkPosition ?? params.watermarkPositionMulti;
|
|
1413
|
+
setNumberOnce('watermarkMargin', Number(params.watermarkMarginMulti ?? 0));
|
|
1414
|
+
setNumberOnce('watermarkScale', Number(params.watermarkScaleMulti ?? 0));
|
|
1415
|
+
setStringOnce('watermarkColor', String(params.watermarkColorMulti ?? ''));
|
|
1416
|
+
setNumberOnce('watermarkFontSize', Number(params.watermarkFontSizeMulti ?? 0));
|
|
1417
|
+
await includeWatermarkFile(String(params.watermarkImageBinaryProperty ?? ''));
|
|
1418
|
+
}
|
|
1334
1419
|
break;
|
|
1335
1420
|
}
|
|
1336
1421
|
}
|
|
@@ -1491,64 +1576,61 @@ class DavixH2I {
|
|
|
1491
1576
|
formData.tools = tools.join(',');
|
|
1492
1577
|
}
|
|
1493
1578
|
const hasTool = (toolName) => selectedTools.includes(toolName);
|
|
1579
|
+
const getParams = (path) => this.getNodeParameter(path, itemIndex, {}) || {};
|
|
1494
1580
|
if (hasTool('metadata')) {
|
|
1495
|
-
const
|
|
1496
|
-
?
|
|
1497
|
-
:
|
|
1498
|
-
if (
|
|
1499
|
-
setBool('includeRawExif',
|
|
1581
|
+
const params = action === 'single'
|
|
1582
|
+
? getParams('toolParametersSingle.metadata')
|
|
1583
|
+
: getParams('toolParametersMulti.metadata');
|
|
1584
|
+
if (params.metadataIncludeRawExifSingle ?? params.metadataIncludeRawExifMulti)
|
|
1585
|
+
setBool('includeRawExif', Boolean(params.metadataIncludeRawExifSingle ?? params.metadataIncludeRawExifMulti));
|
|
1500
1586
|
}
|
|
1501
1587
|
if (hasTool('palette')) {
|
|
1502
|
-
const
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
setNumber('paletteSize', paletteSize);
|
|
1588
|
+
const params = action === 'single' ? getParams('toolParametersSingle.palette') : getParams('toolParametersMulti.palette');
|
|
1589
|
+
const val = params.paletteSizeSingle ?? params.paletteSizeMulti;
|
|
1590
|
+
if (val)
|
|
1591
|
+
setNumber('paletteSize', Number(val));
|
|
1507
1592
|
}
|
|
1508
1593
|
if (hasTool('hash')) {
|
|
1509
|
-
const
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
setString('hashType', hashType);
|
|
1594
|
+
const params = action === 'single' ? getParams('toolParametersSingle.hash') : getParams('toolParametersMulti.hash');
|
|
1595
|
+
const val = params.hashTypeSingle ?? params.hashTypeMulti;
|
|
1596
|
+
if (val)
|
|
1597
|
+
setString('hashType', String(val));
|
|
1514
1598
|
}
|
|
1515
1599
|
if (hasTool('quality')) {
|
|
1516
|
-
const
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
setNumber('qualitySample', qualitySample);
|
|
1600
|
+
const params = action === 'single' ? getParams('toolParametersSingle.quality') : getParams('toolParametersMulti.quality');
|
|
1601
|
+
const val = params.qualitySampleSingle ?? params.qualitySampleMulti;
|
|
1602
|
+
if (val)
|
|
1603
|
+
setNumber('qualitySample', Number(val));
|
|
1521
1604
|
}
|
|
1522
1605
|
if (hasTool('transparency')) {
|
|
1523
|
-
const
|
|
1524
|
-
?
|
|
1525
|
-
:
|
|
1526
|
-
|
|
1527
|
-
|
|
1606
|
+
const params = action === 'single'
|
|
1607
|
+
? getParams('toolParametersSingle.transparency')
|
|
1608
|
+
: getParams('toolParametersMulti.transparency');
|
|
1609
|
+
const val = params.transparencySampleSingle ?? params.transparencySampleMulti;
|
|
1610
|
+
if (val)
|
|
1611
|
+
setNumber('transparencySample', Number(val));
|
|
1528
1612
|
}
|
|
1529
1613
|
if (hasTool('similarity')) {
|
|
1530
|
-
const
|
|
1531
|
-
?
|
|
1532
|
-
:
|
|
1533
|
-
const
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
setNumber('similarityThreshold', similarityThreshold);
|
|
1614
|
+
const params = action === 'single'
|
|
1615
|
+
? getParams('toolParametersSingle.similarity')
|
|
1616
|
+
: getParams('toolParametersMulti.similarity');
|
|
1617
|
+
const mode = params.similarityModeSingle ?? params.similarityModeMulti;
|
|
1618
|
+
const threshold = params.similarityThresholdSingle ?? params.similarityThresholdMulti;
|
|
1619
|
+
if (mode)
|
|
1620
|
+
setString('similarityMode', String(mode));
|
|
1621
|
+
if (threshold)
|
|
1622
|
+
setNumber('similarityThreshold', Number(threshold));
|
|
1540
1623
|
}
|
|
1541
1624
|
if (hasTool('efficiency')) {
|
|
1542
|
-
const
|
|
1543
|
-
?
|
|
1544
|
-
:
|
|
1545
|
-
const
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
setNumber('efficiencyQuality', efficiencyQuality);
|
|
1625
|
+
const params = action === 'single'
|
|
1626
|
+
? getParams('toolParametersSingle.efficiency')
|
|
1627
|
+
: getParams('toolParametersMulti.efficiency');
|
|
1628
|
+
const formatVal = params.efficiencyFormatSingle ?? params.efficiencyFormatMulti;
|
|
1629
|
+
const qualityVal = params.efficiencyQualitySingle ?? params.efficiencyQualityMulti;
|
|
1630
|
+
if (formatVal)
|
|
1631
|
+
setString('efficiencyFormat', String(formatVal));
|
|
1632
|
+
if (qualityVal)
|
|
1633
|
+
setNumber('efficiencyQuality', Number(qualityVal));
|
|
1552
1634
|
}
|
|
1553
1635
|
const response = await GenericFunctions_1.davixRequest.call(this, {
|
|
1554
1636
|
method: 'POST',
|