# Rotate Image Angle

This function block rotates an incoming image by a user-defined angle. You can control the angle via the on-block slider or feed an external numeric value into its input socket. You may also choose the interpolation method and optionally crop resulting background areas.

## 📥 Inputs (sockets) <a href="#inputs" id="inputs"></a>

`Image Any` Provide the source image to be rotated.

(You may optionally provide a numeric angle via the angle socket if available on your canvas to override the on-block slider.)

## 📤 Outputs (sockets) <a href="#outputs" id="outputs"></a>

`Image Any` The rotated (and optionally cropped) output image.

`Angle` The numeric rotation angle applied (degrees).

## 🕹️ Controls <a href="#controls" id="controls"></a>

`Angle` Use the slider to set the desired rotation in degrees. The slider also accepts an external numeric input if you prefer programmatic control.

`Interpolation Method` Choose how pixels are interpolated during rotation. Options typically include nearest and linear methods; pick the one that balances quality and speed for your case.

`Crop Background` Toggle this to remove black/empty regions introduced by rotation. When enabled, the block crops the rotated image to the largest central area without background artifacts.

## 🎨 Features <a href="#features" id="features"></a>

* Live angle control via an adjustable slider or external numeric input.
* Selectable interpolation for visual quality vs. speed trade-offs.
* Optional automatic cropping to remove background areas created by rotation.
* Outputs both the processed image and the applied angle value for downstream use.

## 📝 How it runs <a href="#usage" id="usage"></a>

1. Provide an image to the `Image Any` input socket or feed an image-producing block (for example, `Camera USB` or `Load Image From Path`).
2. Set the angle using the `Angle` slider or connect a numeric source to the angle input.
3. Choose the preferred `Interpolation Method`.
4. Toggle `Crop Background` on if you want the output trimmed to avoid black corners.
5. Run the flow — the block outputs the rotated image and the final angle value.

## 💡 Tips and Tricks <a href="#tips-and-tricks" id="tips-and-tricks"></a>

* For live camera feeds, combine with `Camera USB`, `Camera IP`, or `Stream Reader` as your image source and preview results with `Show Image`.
* To focus rotation on a specific area, crop first with `Image ROI Select` and then rotate the cropped region.
* To avoid visible artifacts on noisy images, try `Denoising` before rotation.
* Save processed images using `Image Logger` or `Image Write` for record keeping.

## 🛠️ Troubleshooting <a href="#troubleshooting" id="troubleshooting"></a>

* If you see black corners after rotation, enable `Crop Background` to remove them.
* If rotated images look blocky or contain interpolation artifacts, switch the `Interpolation Method` to a higher-quality option (for example, from nearest to linear).
* If processing is slow or uses too much memory, reduce input size with `Image Resizer` before rotating.
* When providing angle via an external source, ensure the value is a valid numeric degree amount; otherwise the visual result may be unexpected.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.augelab.com/function-blocks/image-transformations/operations/rotate-image-angle.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
