Image Tool icon

Image Tool

Image-related tools, including image analysis, color correction, and image compression, etc.

Overview

The node "Image Tool" provides various image-related operations, including adding watermarks to images. The "Add Watermark" operation allows users to overlay a watermark image onto a target image, either from a URL or from binary data within the workflow. This is useful for branding images, protecting intellectual property, or marking images with logos or text overlays.

Practical examples:

  • Automatically add a company logo watermark to product images before publishing.
  • Overlay copyright marks on photos uploaded by users.
  • Batch process images to include a watermark for social media sharing.

Properties

Name Meaning
Output Field The name of the output buffer field where the resulting image data will be stored.
Binary File Whether the main image to be watermarked should be taken from a binary field (true) or from a URL (false).
URL The URL of the main image to be watermarked (used if Binary File is false).
Input Binary Field The name of the binary field containing the main image data (used if Binary File is true).
Binary File (watermark) Whether the watermark image should be taken from a binary field (true) or from a URL (false).
URL (watermark) The URL of the watermark image (used if Binary File (watermark) is false).
Input Binary Field (watermark) The name of the binary field containing the watermark image data (used if Binary File (watermark) is true).
Options Collection of optional parameters to control watermark placement and scaling:
- Bottom Margin Pixel offset from the bottom edge of the main image.
- Left Margin Pixel offset from the left edge of the main image; prioritized over right margin.
- Right Margin Pixel offset from the right edge of the main image.
- Top Margin Pixel offset from the top edge of the main image; prioritized over bottom margin.
- Watermark Scale Scale factor to resize the watermark image relative to its original size.

Output

The node outputs the processed image data in a JSON field named as specified by the "Output Field" property (default is "data"). This field contains the image buffer with the watermark applied.

If the input was provided as binary data, the output will also be in binary form suitable for further processing or saving.

Dependencies

  • The node requires access to image processing libraries bundled within the node's dependencies (not explicitly listed here).
  • If URLs are used for images or watermarks, the node needs internet access to download these images.
  • No external API keys or credentials are required specifically for this operation unless other operations in the node require them.

Troubleshooting

  • Common issues:

    • Providing an invalid or inaccessible URL for the main image or watermark will cause errors.
    • Incorrect binary field names may result in missing image data.
    • Setting conflicting margin options (e.g., both left and right margins) may lead to unexpected watermark positioning.
    • Very large images or watermarks might cause performance issues or timeouts.
  • Error messages:

    • "Unknown operation" error indicates that the selected operation is not supported.
    • Errors related to image loading usually indicate problems with URLs or binary data.
  • Resolutions:

    • Verify URLs are correct and accessible.
    • Ensure binary fields exist and contain valid image data.
    • Adjust margin and scale settings carefully to achieve desired watermark placement.
    • Test with smaller images if performance issues occur.

Links and References

Discussion