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 operation "Rotate Image By EXIF Data" processes an image file to automatically rotate it according to its embedded EXIF orientation metadata. This is useful when images are taken with devices that store orientation information in EXIF tags rather than physically rotating the pixels, which can cause images to appear sideways or upside down in some viewers.

Common scenarios include:

  • Automatically correcting the orientation of photos uploaded from cameras or smartphones before further processing or display.
  • Preparing images for consistent presentation in workflows that involve image manipulation, storage, or sharing.
  • Ensuring downstream nodes receive correctly oriented images without manual intervention.

For example, a user might upload a batch of photos from a mobile device and use this node to normalize their orientation based on EXIF data before resizing or watermarking them.

Properties

Name Meaning
Input Data Type Choose how to provide the image file to rotate by EXIF data. Options: Binary Data, Base64 String, URL.
Input Binary Field (If Input Data Type is Binary Data) The name of the binary property containing the image file.
Base64 Image Content (If Input Data Type is Base64 String) The base64 encoded string representing the image content.
Image URL (If Input Data Type is URL) The URL pointing to the image file to be rotated by EXIF data.
Output File Name The desired filename for the output rotated image file. Default is "rotate_image_by_exif_data_output.png".
Async Enable asynchronous processing (true/false).
Binary Data Output Name Custom name for the binary data field in the node's output. Default is "data".

Output

The node outputs the rotated image as binary data under the specified binary data output name (default "data"). The output includes:

  • A binary property containing the rotated image file data.
  • The output file will have the name specified by the "Output File Name" property.

This allows subsequent nodes to access the corrected image either for saving, further processing, or transmission.

Dependencies

  • Requires access to the input image data either as binary data from a previous node, a base64 encoded string, or a publicly accessible URL.
  • No explicit external API keys or services are required; the rotation is performed internally based on EXIF metadata.
  • The node supports asynchronous processing to handle potentially large images efficiently.

Troubleshooting

  • Issue: Image does not rotate as expected.

    • Cause: The image may lack EXIF orientation metadata or the metadata is incorrect.
    • Solution: Verify the source image contains valid EXIF orientation tags. Use metadata inspection tools if needed.
  • Issue: Node fails when using URL input.

    • Cause: The URL may be inaccessible, require authentication, or point to a non-image resource.
    • Solution: Ensure the URL is publicly accessible and points directly to an image file.
  • Issue: Binary data input field not found.

    • Cause: The specified binary property name does not exist in the incoming data.
    • Solution: Confirm the correct binary property name is set matching the previous node's output.
  • Error messages typically relate to invalid input data types or missing properties. Enabling "Continue On Fail" can help process multiple items even if some fail.

Links and References

Discussion