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 color correction, image analysis, compression, watermarking, and image-to-image transformations. Specifically, the Color Correction operation allows users to adjust the color balance of an image by modifying shadows, midtones, and highlights in terms of cyan-red, magenta-green, and yellow-blue channels.

This node is beneficial when you need to automate image enhancement workflows, such as improving photo quality, correcting color casts, or preparing images for publishing. For example, a user can input an image URL or binary data and apply precise color adjustments to shadows, midtones, and highlights to achieve a desired visual effect.

Properties

Name Meaning
Operation The action to perform; here it should be set to "colorCorrection" for this operation.
Output Field The name of the output buffer field where the processed image data will be stored (default: "data").
Binary File Boolean indicating whether the input image is provided as binary data (true) or via a URL (false).
URL The URL of the image to process (used only if Binary File is false).
Input Binary Field The name of the binary field containing the image data (used only if Binary File is true).
Shadows Fixed collection of three numeric values (-20 to 20) adjusting the cyan-red, magenta-green, and yellow-blue balance in shadow areas. Default values: Cyan-Red = -5, Magenta-Green = 0, Yellow-Blue = 10.
Midtones Fixed collection of three numeric values (-20 to 20) adjusting the cyan-red, magenta-green, and yellow-blue balance in midtone areas. Default values: Cyan-Red = -5, Magenta-Green = 0, Yellow-Blue = 10.
Highlights Fixed collection of three numeric values (-20 to 20) adjusting the cyan-red, magenta-green, and yellow-blue balance in highlight areas. Default values: Cyan-Red = -5, Magenta-Green = 0, Yellow-Blue = 10.

Output

The node outputs the processed image data in a JSON field under the specified output buffer field name (default "data"). This field contains the image buffer after applying the color correction adjustments.

If the input was binary, the output will be binary data representing the corrected image. If the input was from a URL, the output similarly contains the corrected image data ready for further use or saving.

Dependencies

  • The node depends on internal operation classes that handle downloading images, color correction, compression, watermarking, and image-to-image processing.
  • It requires access to the internet if the image is provided via URL.
  • No explicit external API keys or credentials are required for the color correction operation itself.
  • The node uses n8n's standard mechanisms for handling binary data fields.

Troubleshooting

  • Common issues:
    • Providing an invalid or inaccessible image URL will cause download failures.
    • Incorrect binary field names may result in missing input data errors.
    • Values outside the allowed range (-20 to 20) for color adjustments might be rejected or cause unexpected results.
  • Error messages:
    • "Unknown operation: <operation>" indicates the selected operation is not supported.
    • Errors related to image download or processing usually indicate network issues or corrupted input data.
  • Resolutions:
    • Verify URLs are correct and accessible.
    • Ensure binary field names match those in the incoming data.
    • Use valid numeric ranges for color adjustment parameters.

Links and References

Discussion