Rotate Image
Rotates an image by a specified number of degrees clockwise or counterclockwise.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
info
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Inputs
- In Path - Path to the input image file.
- Degrees - Number of degrees to rotate the image. Positive values rotate clockwise, negative values rotate counterclockwise.
- Out Path - Path where the rotated output image will be saved.
Options
This node does not have any configurable options.
Output
- result - Boolean indicating success or failure of the rotation operation.
How It Works
The Rotate Image node uses ImageMagick library to rotate an image by the specified angle. When executed, the node:
- Validates input and output file paths
- Loads the specified input image
- Applies the rotation transformation using the specified degree value
- Saves the rotated image to the output path
Requirements
- Valid input image file at the specified path
- Output path must be writable
Error Handling
The node will return specific errors in the following cases:
- Empty or invalid input file path
- Input file not found at the specified path
- Empty or invalid output file path
Usage Notes
- Positive degree values rotate the image clockwise
- Negative degree values rotate the image counterclockwise
- Common rotation values:
- 90 degrees for a quarter turn clockwise
- -90 degrees for a quarter turn counterclockwise
- 180 degrees for a half turn
- 270 degrees for a three-quarter turn clockwise
- The node automatically adjusts the canvas size to accommodate the rotated image
- Image dimensions may change after rotation, especially for angles other than multiples of 90 degrees
- Processing time is generally fast for most rotation angles
- Useful for:
- Correcting image orientation
- Creating rotational variations of images
- Preparing images for specific layout requirements
- The output image format is determined by the file extension in the Out Path
- Metadata may be updated to reflect the rotation transformation
- For best quality, avoid multiple successive rotations as they may introduce cumulative quality loss