PDF4me icon

PDF4me

Comprehensive PDF and document processing: generate barcodes, convert files, extract data, manipulate images, and automate workflows with the PDF4ME API

Actions80

Overview

This node performs image rotation operations. It allows users to rotate an image by a specified angle, with options to maintain the image proportions and set a background color for the rotated image. The node supports multiple input methods for the image: binary data from a previous node, a base64-encoded string, or a URL pointing to the image file.

Common scenarios where this node is useful include:

  • Automatically rotating images uploaded in workflows to correct orientation.
  • Processing images fetched from URLs or encoded strings before further manipulation or storage.
  • Preparing images for reports, presentations, or web display by adjusting their orientation.

Practical example:

  • A workflow that receives user-uploaded photos (binary data), rotates them 90 degrees clockwise while maintaining proportions, and outputs the rotated images for downstream processing or saving.

Properties

Name Meaning
Input Data Type Method to provide the image: "Binary Data" (from previous node), "Base64 String", or "URL".
Input Binary Field Name of the binary property containing the image file (used if Input Data Type is Binary).
Base64 Image Content Base64 encoded string of the image content (used if Input Data Type is Base64).
Image URL URL pointing to the image file to rotate (used if Input Data Type is URL).
Output File Name Desired filename for the rotated output image (e.g., "rotate_image_output.png").
Background Color Hex color code for the background fill during rotation (e.g., "#FFFFFF" for white).
Proportionate Resize Boolean flag to maintain image proportions during rotation (true/false).
Rotation Angle Numeric value specifying the rotation angle in degrees (e.g., 90).
Async Boolean flag to enable asynchronous processing (true/false).

Output

The node outputs the rotated image as binary data under the specified output file name. The json output field contains metadata about the processed image, such as its properties or status. If the input was binary data, the output will be binary data representing the rotated image file.

If the node handles binary data, the output binary data represents the rotated image file ready for further use or saving.

Dependencies

  • Requires access to image processing capabilities, likely via an external library or API integrated within the node's implementation.
  • No explicit external service or API key is indicated in the provided source code snippet.
  • Proper configuration of input data (binary, base64, or URL) is necessary for successful operation.

Troubleshooting

  • Common issues:

    • Incorrect input data type selection leading to missing or invalid image data.
    • Invalid or inaccessible image URL causing download failures.
    • Unsupported image formats or corrupted image data.
    • Rotation angles outside expected ranges might cause unexpected results.
    • Background color format errors (should be valid hex color codes).
  • Error messages and resolutions:

    • Errors related to missing binary data: Ensure the binary property name matches the actual input binary field.
    • Base64 decoding errors: Verify the base64 string is correctly formatted and complete.
    • URL fetch errors: Confirm the URL is accessible and points directly to an image file.
    • Processing errors: Check that the rotation angle and other parameters are valid and supported.

Links and References

Discussion