# Image Resizer

This function block scales an incoming image by a user-defined percentage. Use it when you want to reduce or enlarge images quickly without choosing exact pixel dimensions.

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

`Image Any` Accepts any image that you want to resize.

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

`Image Any` The resized image produced according to the percentage you enter.

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

`Define Scale Percent` A label describing the scaling control.

`Enter a percentage` A text field where you type the scale percent. Examples:

* Enter `50` to reduce dimensions to half.
* Enter `200` to double the dimensions.

Note: Provide a positive number. Values below 100 make the image smaller; values above 100 enlarge it.

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

* Simple percentage-based resizing — no need to specify width or height.
* Works with any image color format supported by the system.
* Fast and lightweight, suitable for preprocessing before analysis or display.

## 📝 Usage Instructions <a href="#usage" id="usage"></a>

1. Connect an image-producing block to the `Image Any` input.
2. Enter the desired scale percentage into the `Enter a percentage` control.
3. Run the scenario — the block outputs the resized image on its `Image Any` output.
4. Use the resized image for further processing or visualization.

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

* If you need to set exact pixel dimensions rather than a percentage, combine this block with `Image Resize` which lets you define exact width and height.
* Preview results visually by connecting the output to `Show Image` for quick checks.
* For noisy images, consider applying `Blur` or `Denoising` before resizing to reduce artifacts.
* To save resized frames automatically, connect the output to `Image Logger` or `Image Write`.

## 📊 How it runs <a href="#evaluation" id="evaluation"></a>

When the block runs, it reads the percentage you provided, rescales the incoming image accordingly, and emits the resized image. The operation happens every evaluation so changes to the percentage are applied immediately during the next run.

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

* If the output looks distorted, verify the percentage value is reasonable (not zero or negative).
* Very large scale values may increase memory usage and processing time. Use moderate values when possible.
* If the downstream block expects a specific image size, use `Image Resize` to ensure exact dimensions rather than relying on a percentage.


---

# 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/blocks-reference/image-transformations/operations/image-resizer.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.
