Image Processor

Process images using sharp library

读取图片信息和EXIF

AI-generated

Overview

This node operation reads basic image information and EXIF metadata from an image input. It supports input types such as file path, base64 encoded image, or binary data. Users can choose to include EXIF information in the output metadata and specify the encoding format for EXIF data if it is in Buffer format. This operation is useful for extracting detailed metadata from images for further processing or analysis, such as reading camera settings, geolocation, or other embedded information.

Use Case Examples

  1. Extract EXIF metadata from a photo file to analyze camera settings.
  2. Read image dimensions and metadata from a base64 encoded image string.
  3. Retrieve detailed EXIF data from binary image data for digital asset management.

Properties

Name Meaning
包含EXIF信息 Whether to include EXIF information and the parsed encoding format in the output metadata.
EXIF编码格式 The encoding format to use when EXIF data is a Buffer, such as UTF-8, ASCII, GB2312, GBK, Latin1, Hex, Base64, or raw object format.
Input Type The type of input for the image, which can be a file path, base64 string, or binary data.
Source Path The path of the source image file, required if input type is file path.
Base64 Image The base64 encoded image data, required if input type is base64.
Binary Property The binary property containing the image data, required if input type is binary data.

Output

JSON

  • metadata
    • exif - EXIF metadata if included.
    • exifEncoding - The encoding format used for EXIF data.

Dependencies

  • sharp library for image processing

Troubleshooting

  • Ensure the input image data is correctly provided according to the selected input type (file path, base64, or binary).
  • If EXIF data is not appearing, verify that '包含EXIF信息' is set to true and the encoding format matches the EXIF data encoding.
  • Errors related to file paths usually indicate the file does not exist or is inaccessible; check file permissions and path correctness.
  • If the node fails and 'Continue On Fail' is not enabled, the workflow will stop; enable it to handle errors gracefully.

Discussion