0CodeKit icon

0CodeKit

A toolbox of no-code utilities

Actions114

Image → Rotate

AI-generated

Overview

This node operation rotates an image by a specified angle. It supports input images provided either as a publicly accessible URL or as a buffer. Users can specify the rotation angle and optionally set a background color to be used during the rotation. The node is useful for image processing workflows where image orientation needs adjustment, such as preparing images for display, correcting scanned documents, or automating image editing tasks.

Use Case Examples

  1. Rotate a product image by 90 degrees to correct its orientation before uploading to an e-commerce site.
  2. Rotate a scanned document image by 180 degrees to make it readable in an automated document processing workflow.

Properties

Name Meaning
Code Variables Variables defined in the code editor for the selected function, allowing dynamic input values.
Type of Data Specifies whether the input image is provided as a URL or a buffer.
URL The publicly accessible URL of the image to be rotated. Required if Type of Data is URL.
Buffer The buffer string of the image to be rotated. Required if Type of Data is Buffer.
Angle The angle in degrees to rotate the image by.
Background Background color or value to use for the image during rotation.
File Name Filename of the image to operate on, useful for output naming.
Get File as URL Whether to get the resulting image as a URL after processing.

Output

JSON

  • rotatedImageUrl - URL of the rotated image if Get File as URL is true.
  • rotatedImageBuffer - Buffer data of the rotated image if Get File as URL is false.

Dependencies

  • Requires an API key credential for the 0CodeKit service to perform image rotation.

Troubleshooting

  • Ensure the input image URL is publicly accessible if using URL input type; otherwise, the node may fail to fetch the image.
  • If using buffer input, ensure the buffer string is correctly formatted and represents a valid image.
  • The angle parameter must be a valid number; invalid or missing angle may cause errors or no rotation effect.
  • If the background parameter is set, ensure it is a valid color or value supported by the image processing service.
  • Check API key credentials and network connectivity if the node fails to communicate with the 0CodeKit API.

Discussion