0CodeKit icon

0CodeKit

A toolbox of no-code utilities

Actions108

Overview

The node provides image manipulation capabilities as part of a broader "0CodeKit" toolbox. Specifically, the Rotate operation under the Image resource allows users to rotate an image by a specified angle. This is useful in scenarios where images need orientation correction or creative rotation effects.

Typical use cases include:

  • Automatically rotating uploaded photos to correct orientation.
  • Rotating images for design or presentation purposes.
  • Preparing images for further processing or display with a specific rotation.

For example, you can input an image URL or buffer and specify an angle (e.g., 90 degrees) to rotate the image clockwise, optionally setting a background color to fill any exposed areas after rotation.

Properties

Name Meaning
Code Variables Allows defining multiple code variables by selecting variable names/IDs from a list and assigning values. These variables are used when running custom code functions within the node.
Type of Data Specifies the input type of the image data: either a publicly accessible URL or a Buffer containing the image data.
URL The publicly accessible URL of the image to be rotated. Required if "Type of Data" is set to URL.
Buffer The image data buffer to be rotated. Required if "Type of Data" is set to Buffer.
Angle The angle in degrees to rotate the image by. Positive values typically rotate clockwise.
Background The background color to use for the image areas revealed after rotation. Can be left empty for default behavior.
File Name Optional filename for the image being processed. Useful for naming output files or referencing the image in workflows.
Get File as URL Boolean flag indicating whether the output image should be returned as a URL (true) or as raw data (false). Defaults to true.

Output

The node outputs a JSON array where each item corresponds to one input item processed. Each output item contains the rotated image data. Depending on the "Get File as URL" property, the output image will be provided either as:

  • A publicly accessible URL pointing to the rotated image.
  • Raw binary data representing the rotated image.

The exact structure of the output JSON includes fields such as the image data or URL, and may include metadata like filename if provided.

Dependencies

  • Requires an API key credential for the "0CodeKit" service, which provides the backend functionality for image processing.
  • The image URL must be publicly accessible if using the URL input type.
  • No other external dependencies are indicated.

Troubleshooting

  • Invalid Image URL or Buffer: Ensure the image URL is publicly accessible without authentication or that the buffer contains valid image data.
  • Missing or Invalid Angle: The angle must be a valid number; otherwise, the rotation will fail.
  • API Authentication Errors: Verify that the API key credential is correctly configured and has necessary permissions.
  • Background Color Issues: If the background color is invalid or unsupported, the output image might have unexpected artifacts.
  • Output URL Not Returned: If "Get File as URL" is false, ensure downstream nodes can handle binary data properly.

Common error messages will relate to invalid inputs, missing parameters, or authentication failures. Resolving these usually involves verifying input correctness and credential setup.

Links and References

Discussion