# Image Resizer

This function block is designed to resize images by a percentage specified by the user. It allows you to scale images up or down easily based on the original dimensions.

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

`Image Any` This input accepts any image data that you want to resize.

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

`Image Any` The output will be the resized version of the input image.

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

`Define Scale Percent` A label indicating that you need to enter a percentage to define the resizing scale.

`Enter a percentage` A text input where you can enter the desired percentage. Values above 100 will increase the size, while values below 100 will decrease it.

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

`Flexible Resizing` Users can specify any percentage to control the scale of the resize operation, allowing for extensive flexibility.

`Real-time Feedback` The block processes and outputs the resized image immediately upon evaluation.

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

1. **Connect Input Image**: Connect the image you wish to resize to the `Image Any` input.
2. **Enter Resize Percentage**: In the text input, enter a percentage value to determine how much the image should be resized (e.g., `50` for 50% of the original size, `200` for double the size).
3. **Evaluate**: Run the block to process the image. The resized image will be outputted.

## 📊 Evaluation <a href="#evaluation" id="evaluation"></a>

Upon execution, this function block will calculate the new dimensions based on the provided percentage and output the resized image accordingly.

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

<details>

<summary>Choosing the Right Percentage</summary>

Always test with a small percentage incrementally to ensure the resized image maintains good quality without becoming pixelated.

</details>

<details>

<summary>Combining with Other Blocks</summary>

Consider using the `Batch Processing` block for resizing multiple images at once, allowing for efficient adjustments in a batch workflow.

</details>

<details>

<summary>Check Size Before Moving Forward</summary>

Use the `Get Dimension` block prior to resizing to check the current size and adjust your percentage accordingly.

</details>

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

<details>

<summary>Invalid Percentage</summary>

If you encounter issues resizing, make sure that the percentage entered is a valid number. The percentage must be a positive float(int).

</details>

<details>

<summary>Unexpected Output Size</summary>

Keep in mind that percentages greater than 100 will enlarge the image, and percentages less than 100 will shrink the image. Verify that the intended size is achieved by checking the resized image’s dimensions with the `Get Dimension` block.

</details>
