Actions74
- ai Actions
- array Actions
- audiovideo Actions
- carbone Actions
- charts Actions
- code Actions
- data Actions
- datetime Actions
- events Actions
- files Actions
- geo Actions
- hellospaces Actions
- images Actions
- Get Metadata of an Image
- Scale an Image
- Overlay an Image on another Image
- Scale an Image to Fit Given Dimensions
- Resize an Image
- Mask an Image with Another Image
- Mask an Image with a Circle Mask
- Crops an image by the given x, y, width and height paramters.
- Convert Texts to an Image
- Convert HTML String or URL to an Image
- Generates a QRCode with given text and color.
- Get EXIF from Image
- Remove EXIF from Image
- Modify Image EXIF
- playground Actions
- spreadsheet Actions
- stripe Actions
- youtube Actions
images → Mask an Image with Another Image
AI-generatedOverview
This node allows you to mask one image with another, using the "Mask an Image with Another Image" operation under the "images" resource. It is useful for scenarios where you want to apply a mask (such as a shape or transparency pattern) to an image, for example:
- Creating profile pictures with custom shapes.
- Applying branded overlays or watermarks.
- Generating images with specific cutouts for design or automation purposes.
Practical Example:
You have a user-uploaded photo and want to crop it into a circular avatar using a circle-shaped mask image.
Properties
| Name | Meaning |
|---|---|
| X coordinate | The horizontal position from the top left corner where the mask will be applied. Defaults to 0. |
| Y coordinate | The vertical position from the top left corner where the mask will be applied. Defaults to 0. |
| Source image | Image to be masked. This is the main image that will receive the mask. |
| Mask image | Image to be used as the mask. Defines the shape/area to keep in the source image. |
| Binary Property | Name of the binary property to which the resulting masked image data will be written. |
Output
- Binary Data:
The output is a binary file containing the masked image. The binary property name is defined by the "Binary Property" input.- The output includes the original JSON fields and any existing binary data, with the new masked image added under the specified binary property name.
- The binary data contains the processed image file, with filename and content type set according to the result.
Dependencies
- External Service: Requires access to the 1001fx API.
- API Key: You must configure the
1001fxApicredential in n8n. - Environment: No additional environment variables are required beyond standard n8n configuration.
Troubleshooting
Common Issues:
- Missing Binary Data: If the source or mask image is not provided as binary data, the node may fail or produce unexpected results.
- Invalid File Types: Ensure both images are valid and supported formats (e.g., PNG, JPEG).
- Incorrect Binary Property Name: If the "Binary Property" does not match the expected value, the output may not be accessible in subsequent nodes.
Error Messages:
"error": "Cannot read property 'fileName' of undefined": Indicates missing or misnamed binary input properties.- Resolution: Check that your input items contain the correct binary properties and that their names match what you specify in the node.
"error": "Request failed with status code 401": Authentication error.- Resolution: Verify your 1001fx API credentials in n8n.