跳到主要内容

翻转图像 n8n

此节点的功能

PDF4me - 翻转图像 将图像水平、垂直或双向镜像,并将结果以二进制数据的形式返回到您的设备中。 n8n 工作流程。从先前的节点提供源图像的二进制数据, Base64编码字符串,或公共 URL翻转后的输出图像可立即用于云存储、电子邮件、数据库或任何进一步的图像处理步骤——无需手动编辑,无需外部工具。

相关博客文章
目前尚无关于此功能的博客文章——敬请期待。
在此期间,您可以浏览 PDF4me 博客,查看适用于各平台的教程和工作流程。
访问博客

验证您的身份 API 要求

每一个 PDF4me 节点 n8n 需要有效 证书创建或选择包含您的凭据 PDF4me API 密钥,以便节点能够安全地验证图像处理请求。

您不容错过的重要事实

三种输入类型——一次只需要一种。
将输入数据类型设置为二进制数据,并填写输入二进制字段,或者 Base64 字符串和填充 Base64 图像内容,或 URL 并填充图像 URL只有与您选择的类型相匹配的字段才需要赋值——其他两组字段留空以避免出错。
水平和垂直翻转将两种翻转方式结合在一个呼叫中
选择“水平”和“垂直”作为方向类型,会同时沿两个方向翻转图像——结果相当于旋转 180 度。当您需要校正镜像且上下颠倒的图像时,请使用此功能,而无需调用两个单独的翻转函数。
输出文件名设置二进制文件名 - 请使用正确的扩展名
您提供的输出文件名将作为返回的二进制文件的名称,包括扩展名。如果您提供一个 JPEG 并命名输出 结果.png下游节点可能会看到 MIME 类型不匹配。请确保文件扩展名与实际图像格式一致,以便顺利传输到存储或电子邮件节点。
n8n PDF4me 翻转图像节点显示:输入数据类型设置为二进制数据,输入二进制字段引用前一个节点的二进制输出,输出文件名设置为 flipped_image.jpg,方向类型设置为水平,异步设置为 false,二进制数据输出名称设置为 data。

在运行工作流程之前,请设置输入数据类型、映射图像源、设置具有正确扩展名的输出文件名,并选择方向类型。

参数

必需的: 输入数据类型,与该类型匹配的图像字段(输入二进制字段, Base64 图像内容,或图像 URL)、输出文件名、方向类型和二进制数据输出名称。 Async 是可选的。

范围必需的它的作用例子
Input Data TypeYesFormat of the source image. Choose Binary Data to map from a prior node, Base64 String to supply encoded image data, or URL to point to a publicly accessible image file.Binary Data
Input Binary FieldYes (Binary Data)The binary property name from the prior node that holds the image. Use the n8n expression to reference it.{{$binary.data}}
Base64 Image ContentYes (Base64)Base64-encoded string of the image to flip. JPEG, PNG, GIF, and BMP all accepted./9j/4AAQSkZJRgA...
Image URLYes (URL)Publicly accessible URL to the source image. PDF4me downloads and flips the image from this address.https://example.com/photo.jpg
Output File NameYesFilename for the returned flipped image, including extension. Must match the actual image format to avoid MIME mismatches in downstream nodes.flipped_image.jpg
Orientation TypeYesDirection to flip the image. Horizontal mirrors left-to-right. Vertical mirrors top-to-bottom. Horizontal and Vertical applies both simultaneously.Horizontal
AsyncNoWhen true, the operation runs asynchronously and returns immediately without waiting for the result. Useful for large images in batch workflows.false
Binary Data Output NameYesKey name under which the flipped image binary is stored in the n8n output. Downstream nodes reference the image by this name.data

快速设置

  1. 添加一个 PDF4me 节点到你的 n8n 工作流程和选择 翻转图像 作为行动。
  2. 选择或创建 证书 你的 PDF4me API 钥匙。
  3. 输入数据类型 并填写匹配字段——二进制数据 Base64 图像内容,或图像 URL
  4. 进入 输出文件名 使用正确的扩展名。
  5. 选择 方向类型 - 水平、垂直或水平和垂直。
  6. 二进制数据输出名称 (默认: data)并点击 执行节点翻转后的图像已在输出二进制文件中准备就绪。

工作流程示例

工作流程示例Common n8n workflow patterns using Flip Image.
镜像产品图片以导出目录
  1. 一个 HTTP 请求节点获取产品图片 URL来自PIM系统 API
  2. “分批分割”节点处理每张图像 URL 单独地。
  3. 翻转图像功能在输入数据类型设置为时运行 URL方向类型设置为水平,创建每张产品照片的左右镜像。
  4. Google 云端硬盘会将每个翻转后的图像上传到以产品 SKU 命名的“镜像资源”文件夹中。
自动校正倒置的扫描图像
  1. 当扫描的图像到达接收文件夹时,Dropbox 监视文件夹功能就会触发。
  2. 翻转图像功能将方向类型设置为垂直,以纠正扫描仪造成的上下颠倒方向。
  3. 校正后的图像已上传至“已处理扫描件”文件夹。
  4. Slack 通知确认更正后的图片已准备好交付给文档团队。
为社交内容生成前后对比图对
  1. 当新的图像记录添加到内容日历库时,Airtable 会触发。
  2. HTTP 请求从 Airtable 附件下载原始图像 URL
  3. Flip Image 功能会为并排比较帖子的“之后”帧创建一个水平镜像版本。
  4. 两张图片都已上传到 S3,Airtable 记录也已更新为镜像资源。 URL

常见问题解答

What image formats does this node support?+
JPEG, PNG, GIF, and BMP. All four formats can be supplied via binary data from a prior n8n node, as a Base64-encoded string, or as a public URL. The output is returned in the same format you supplied. Make sure the Output File Name extension matches the actual image format to prevent MIME type issues in downstream nodes like email or cloud storage uploads.
What is the practical difference between the three orientation types?+
Horizontal flips the image left-to-right, creating a mirror image - useful for product shots, logos, or social media creative that need a reflected version. Vertical flips top-to-bottom - useful for correcting images that arrived inverted from a scanner or camera orientation. Horizontal and Vertical applies both at once, producing the same result as a 180-degree rotation, which is useful for correcting content that is both mirrored and upside-down.
How do I reference the image from a previous n8n node?+
Set Input Data Type to Binary Data, then in the Input Binary Field, use the n8n expression {{$binary.data}} to reference the binary output of the prior node. If the prior node outputs the image under a different property name - for example "image" instead of "data" - update the expression to {{$binary.image}} to match.
What does Binary Data Output Name control and what should I set it to?+
This field sets the key name under which the flipped image binary is stored in the n8n output item. Any downstream node that needs the flipped image references it by this name. The default value is "data" which works in most workflows. If you are processing multiple images in parallel branches and need to distinguish them, give each a unique name to avoid overwriting.
Can I use this node with the Async flag enabled for large images?+
Yes. Setting Async to true tells the PDF4me API to process the flip in the background and return the job ID immediately instead of waiting for the image. This is useful in high-volume or batch workflows where you do not want the n8n node to time out on a large file. The trade-off is that you need to poll for the result or handle the callback rather than using the output directly in the same execution path.

相关节点

获取帮助