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

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

πŸ“€ Outputs

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

πŸ•ΉοΈ Controls

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

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

  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

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

πŸ’‘ Tips and Tricks

Choosing the Right Percentage

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

Combining with Other Blocks

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

Check Size Before Moving Forward

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

πŸ› οΈ Troubleshooting

Invalid Percentage

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

Unexpected Output Size

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.

Last updated