Skip to main content

Flip Image

Controlled node

Overview

The Flip Image node performs geometric transformations on images by flipping them horizontally, vertically, or both. This is useful for creating mirror effects, correcting image orientation, or preparing images for specific layout requirements.

The node accepts a Jimp image object and applies the specified flip transformations when triggered by the run event. Both horizontal and vertical flips can be applied simultaneously or independently.

Inputs

InputTypeDescriptionDefault
RunEventTriggers the image processing operation.-
ImageDataThe input image to be flipped (Jimp image object).-
HorizontalBooleanWhen true, flips the image horizontally (mirror left-right).false
VerticalBooleanWhen true, flips the image vertically (mirror top-bottom).false

Outputs

OutputTypeDescription
DoneEventFires when the image processing is complete.
OutputDataThe flipped image (Jimp image object).

Runtime Behavior and Defaults

The Flip Image node is a controlled node that processes images synchronously when triggered. It creates a clone of the input image before applying transformations, leaving the original image unchanged.

Default Behavior:

  • If both Horizontal and Vertical are set to false (default), the image passes through unchanged
  • The node uses the Jimp library's native flip() method for high-performance image manipulation
  • Processing occurs immediately upon receiving the run event

Image Requirements:

  • Input must be a valid Jimp image object (typically provided by nodes like Read Image, Screenshot Webpage, or AI Generate Image)
  • The output maintains the same format, dimensions, and color depth as the input

Example Usage

Here's a simple workflow that reads an image from the library, flips it horizontally to create a mirror effect, and then displays the result:

  1. Connect a Read Image node to load an image from your library
  2. Connect the output of Read Image to the image input of Flip Image
  3. Set the Horizontal input to true (or connect a Boolean node set to true)
  4. Trigger the Run event on Flip Image (connected to the Done event of Read Image)
  5. Connect the output of Flip Image to a Show node to view the mirrored result

Advanced Example: To rotate an image 180 degrees without using the Rotate node, you can flip both horizontally and vertically simultaneously by setting both Horizontal and Vertical inputs to true.