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

The node provides an operation to rotate images. It supports multiple input formats for the image, including binary data from a previous node, base64-encoded strings, or URLs pointing to the image file. Users can specify the rotation angle, background color to fill empty areas after rotation, and whether to maintain the image proportions during rotation. The node outputs the rotated image as binary data, which can be used in subsequent workflow steps.

This node is beneficial in scenarios where automated image processing is required, such as preparing images for reports, adjusting photos before uploading, or batch-processing images in workflows. For example, it can be used to rotate scanned documents that were saved sideways or to adjust product images to a consistent orientation.

Properties

Name Meaning
Input Data Type Choose how to provide the image file to rotate. Options: Binary Data, Base64 String, URL.
Input Binary Field Name of the binary property containing the image file (used when Input Data Type is Binary).
Base64 Image Content Base64 encoded string of the image content (used when Input Data Type is Base64).
Image URL URL to the image file to rotate (used when Input Data Type is URL).
Output File Name Desired name for the output rotated image file.
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.
Rotation Angle Numeric value specifying the rotation angle in degrees (e.g., 90, 180, 270).
Async Boolean flag to enable asynchronous processing.
Binary Data Output Name Custom name for the binary data field in the node's output.

Output

The node outputs the rotated image as binary data under a customizable binary property name (default is "data"). The output includes the image file content in binary form, suitable for further processing or saving. The output JSON may also contain metadata related to the processed image.

If the input was binary data, the output preserves the binary format with the rotated image content. If the input was base64 or URL, the node converts and outputs the rotated image as binary data.

Dependencies

  • Requires access to the image file either via binary data from a previous node, a base64 string, or a reachable URL.
  • No explicit external API keys or services are indicated in the provided source code snippet.
  • The node likely depends on internal image processing libraries bundled within the node's implementation (not shown explicitly here).

Troubleshooting

  • Common Issues:
    • Invalid or inaccessible image URL may cause failures in loading the image.
    • Incorrect base64 string format can lead to decoding errors.
    • Unsupported image formats might not be processed correctly.
    • Specifying an invalid rotation angle (non-numeric or out-of-range) could cause unexpected results.
  • Error Messages:
    • Errors related to missing binary data or incorrect binary property names.
    • Network errors when fetching images from URLs.
    • Decoding errors for base64 inputs.
  • Resolutions:
    • Verify the correctness and accessibility of URLs.
    • Ensure base64 strings are properly encoded.
    • Confirm the binary property name matches the actual input data.
    • Use supported image formats (e.g., PNG, JPEG).

Links and References

Discussion