Skip to main content

Resize Image

Controlled node

Overview

The Resize Image node resizes an image to specified dimensions using the Jimp image processing library. It supports both exact resizing (which may distort the aspect ratio) and aspect-ratio-preserving scaling that fits the image within the specified bounds.

Inputs

InputTypeDescriptionDefault
RunEventTriggers the image resizing operation-
ImageDataThe image object to resize (Jimp image)-
WidthNumberTarget width in pixelsOriginal image width
HeightNumberTarget height in pixelsOriginal image height
Preserve AspectBooleanWhen enabled, scales the image to fit within the specified dimensions while maintaining the original aspect ratiofalse

Outputs

OutputTypeDescription
DoneEventFires when the resize operation is complete
OutputDataThe resized image object

Runtime Behavior and Defaults

  • If Width or Height inputs are not provided or connected, the node defaults to the original dimensions of the input image
  • When Preserve Aspect is enabled, the node uses scaleToFit which scales the image proportionally to fit entirely within the specified width and height. The resulting image maintains its aspect ratio and may be smaller than the specified dimensions in one axis.
  • When Preserve Aspect is disabled, the node uses resize which stretches or compresses the image to exactly match the specified width and height, potentially distorting the aspect ratio
  • The node creates a clone of the original image before processing, leaving the input image unchanged

Example Usage

To resize an image to a thumbnail while maintaining quality:

  1. Use a Read Image node to load an image from the library
  2. Connect the image output to the Resize Image node's Image input
  3. Set Width to 200 and Height to 200 in the properties panel (or connect Number nodes)
  4. Enable Preserve Aspect to ensure the thumbnail maintains proportions
  5. Trigger the Run event from a Start node or other event
  6. The Output will contain the resized image, which can be passed to Write To Library or other image processing nodes