Image Resize
This function block changes the size of an incoming image. Use it to scale images up or down with selectable interpolation methods so downstream blocks receive images at the required dimensions.
π₯ Inputs
Image AnyThis is the image you want to resize.WidthDesired output width in pixels. Optional β leave empty to preserve the original width.HeightDesired output height in pixels. Optional β leave empty to preserve the original height.
π€ Outputs
Image AnyThe resized image.
πΉοΈ Controls
Interpolation MethodChoose how pixels are sampled when resizing. Common choices you will see:INTER_NEAREST,INTER_LINEAR,INTER_AREA,INTER_CUBIC,INTER_LANCZOS4.Use
INTER_AREAfor downscaling (good for reducing aliasing).Use
INTER_LINEARfor general-purpose resizing (balanced speed and quality).Use
INTER_CUBICorINTER_LANCZOS4when upscaling and higher image quality is required (slower).
βοΈ How it runs
When this block runs it takes the provided Image Any and uses the chosen Interpolation Method to produce a new image at the requested Width and Height. If either dimension is left blank, that axis will keep the original image size. The resized image is sent to the output for the following blocks in the flow.
π― Key features
Precise control of output size using explicit width and height.
Multiple interpolation options so you can trade off speed and quality.
Works with any image-producing block and prepares images for models or visualization.
π Usage tips
If you need to preview results, connect the output to
Show Image.Crop first then resize for best results when the region of interest is smaller than the full image. Use
Image ROIorSlice Imagebefore this block.To avoid stretching and preserve aspect ratio, crop or pad the image first. Use
Image Paddingto add borders instead of distorting the image.For models that expect smaller inputs (object detection, OCR), resize the image to the modelβs preferred dimensions before feeding it to blocks like
Object Detection (D-FINE),Object Detection - Custom,OCR, orOCR (EasyOCR).
π‘ Tips and Tricks
Preparing for OCR: enlarge a cropped text region with this block before connecting to
OCRorOCR (EasyOCR)to improve recognition accuracy.Preparing for detection: resize camera frames to a consistent size before
Object Detection (D-FINE)orObject Detection - Customso detection thresholds and box sizes behave predictably.Preserve details when upscaling: when you must enlarge small images, pick
INTER_CUBICorINTER_LANCZOS4for better visual quality.Keep aspect ratio safe: to avoid distorted objects, use
Image ROIorImage Paddingto make the crop square (or match the model input) then resize.Quick checks: attach
Show Imageright after this block to confirm the resized output visually.
π οΈ Troubleshooting
Blurry result after upscaling
Try a higher-quality interpolation such as
INTER_CUBICorINTER_LANCZOS4.
Important object appears squashed or stretched
Ensure aspect ratio is preserved. Crop or pad the image before resizing.
Unexpected size or orientation
Verify the numeric values provided to
WidthandHeightand preview withShow Image.If only one dimension should change, leave the other empty to keep the original size for that axis.
Last updated
Was this helpful?