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
| Input | Type | Description | Default |
|---|---|---|---|
| Run | Event | Triggers the image processing operation. | - |
| Image | Data | The input image to be flipped (Jimp image object). | - |
| Horizontal | Boolean | When true, flips the image horizontally (mirror left-right). | false |
| Vertical | Boolean | When true, flips the image vertically (mirror top-bottom). | false |
Outputs
| Output | Type | Description |
|---|---|---|
| Done | Event | Fires when the image processing is complete. |
| Output | Data | The 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
runevent
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:
- Connect a Read Image node to load an image from your library
- Connect the
outputof Read Image to theimageinput of Flip Image - Set the Horizontal input to
true(or connect a Boolean node set totrue) - Trigger the Run event on Flip Image (connected to the Done event of Read Image)
- Connect the
outputof 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.