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
Image Any Accepts any image that you want to resize.
π€ Outputs
Image Any The resized image produced according to the percentage you enter.
πΉοΈ Controls
Define Scale Percent A label describing the scaling control.
Enter a percentage A text field where you type the scale percent. Examples:
Enter
50to reduce dimensions to half.Enter
200to double the dimensions.
Note: Provide a positive number. Values below 100 make the image smaller; values above 100 enlarge it.
π― Features
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
Connect an image-producing block to the
Image Anyinput.Enter the desired scale percentage into the
Enter a percentagecontrol.Run the scenario β the block outputs the resized image on its
Image Anyoutput.Use the resized image for further processing or visualization.
π‘ Tips and Tricks
If you need to set exact pixel dimensions rather than a percentage, combine this block with
Image Resizewhich lets you define exact width and height.Preview results visually by connecting the output to
Show Imagefor quick checks.For noisy images, consider applying
BlurorDenoisingbefore resizing to reduce artifacts.To save resized frames automatically, connect the output to
Image LoggerorImage Write.
π How it runs
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
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 Resizeto ensure exact dimensions rather than relying on a percentage.
Last updated
Was this helpful?