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 "Convert Image Format" allows users to convert an image from one format to another. It supports input images provided as binary data, base64 encoded strings, or via a URL. The node processes the input image and outputs the converted image in the desired format.

Common scenarios where this node is beneficial include:

  • Automating image format conversions in workflows, e.g., converting JPG images to PNG for web optimization.
  • Processing images received in different formats and standardizing them to a single format.
  • Integrating with other nodes that require specific image formats.

Practical example:

  • A user receives product images in various formats (JPG, BMP, TIFF) and wants to convert all of them to PNG before uploading to a website. This node can automate that conversion step.

Properties

Name Meaning
Input Image Data Type Choose how to provide the image file to convert. Options: Binary Data, Base64 String, URL.
Input Binary Field Name of the binary property containing the image file (used if Input Image Data Type is Binary Data).
Base64 Image Content Base64 encoded string of the image content (used if Input Image Data Type is Base64 String).
Image URL URL pointing to the image file (used if Input Image Data Type is URL).
Output File Name Desired name for the output converted image file.
Current Image Format Format of the input image. Options: BMP, GIF, JPG, PNG, TIFF.
New Image Format Format to convert the image to. Options: BMP, GIF, JPG, PNG, TIFF.
Binary Data Output Name Custom name for the binary data field in the node's output.

Output

The node outputs the converted image as binary data under the specified binary data output name. The output includes:

  • json: Metadata about the conversion (typically minimal or empty).
  • binary: Contains the converted image file data with the custom binary data name set by the user.

If the input was binary or base64, the output will be the converted image binary data ready for further processing or saving. If the input was a URL, the node downloads the image, converts it, and outputs the result similarly.

Dependencies

  • Requires access to the image file either as binary data, base64 string, or accessible URL.
  • No explicit external API keys or credentials are required for this operation.
  • The node depends on internal image processing libraries bundled within the node implementation.

Troubleshooting

  • Invalid input data: Ensure the input image data matches the selected input type (e.g., binary data exists if "Binary Data" is chosen).
  • Unsupported image format: Only BMP, GIF, JPG, PNG, and TIFF formats are supported. Using other formats may cause errors.
  • URL access issues: If using URL input, ensure the URL is publicly accessible and returns a valid image.
  • Output file naming: Provide a valid filename with appropriate extension matching the new image format to avoid confusion.
  • Conversion failures: May occur if the input image is corrupted or unsupported; verify the source image integrity.

Links and References

Discussion