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 "Get Image Metadata" extracts metadata information from an image file. It supports multiple input methods for providing the image: binary data from a previous node, a base64 encoded string, or a URL pointing to the image. The node processes the image asynchronously by default and outputs the extracted metadata as a JSON file.

Common scenarios where this node is useful include:

  • Extracting technical details (e.g., dimensions, format) from images in automated workflows.
  • Validating image properties before further processing or storage.
  • Collecting metadata for image cataloging or auditing purposes.

Practical example:

  • A workflow that receives uploaded images, uses this node to extract metadata such as width, height, and format, then routes images based on their size or type.

Properties

Name Meaning
Input Data Type Choose how to provide the image file:
- Binary Data (image from previous node)
- Base64 String (base64 encoded image content)
- URL (link to image file)
Input Binary Field Name of the binary property containing the image file (used only if Input Data Type is Binary Data)
Base64 Image Content Base64 encoded string of the image content (used only if Input Data Type is Base64 String)
Image URL URL to the image file (used only if Input Data Type is URL)
Output File Name Filename for the output metadata JSON file (default: "image_metadata.json")
Image Type Type of the image file: JPG or PNG
Async Enable asynchronous processing (true/false)

Output

The node outputs a JSON object containing the extracted metadata of the image. This metadata typically includes details such as image dimensions, format, color profile, and other relevant technical attributes depending on the image type.

If the node is configured to output a file, it will produce a JSON file named as specified in the "Output File Name" property containing this metadata.

No binary data output is indicated for this operation.

Dependencies

  • Requires access to the image either as binary data, base64 string, or via a URL.
  • If using URL input, the node must have network access to fetch the image.
  • No explicit external API keys or credentials are mentioned; however, the node likely depends on internal libraries or services to parse image metadata.

Troubleshooting

  • Common issues:

    • Providing an incorrect binary field name when using binary data input may cause the node to fail to find the image.
    • Invalid or inaccessible URLs will result in errors fetching the image.
    • Incorrect base64 strings can cause parsing failures.
    • Mismatched image type selection (e.g., specifying JPG but providing a PNG) might lead to unexpected results or errors.
  • Error messages:

    • Errors related to missing binary data or invalid base64 content usually indicate misconfiguration of input properties.
    • Network errors when fetching image URLs suggest connectivity or URL validity problems.
  • Resolutions:

    • Verify the binary property name matches the actual binary data key.
    • Ensure base64 strings are correctly encoded without extra characters.
    • Confirm URLs are reachable and point directly to image files.
    • Match the "Image Type" property with the actual image format.

Links and References

Discussion