Skip to main content

Scale Image

Controlled node

Overview

The Scale Image node resizes an image by a specified scale factor using the Jimp image processing library. Unlike the Resize Image node which takes absolute pixel dimensions, this node uses a multiplier to scale the image proportionally.

Pass a factor of 0.5 to reduce the image to half its original size, or 2 to double the size. The scaling is applied uniformly to both width and height, maintaining the aspect ratio.

Inputs

InputTypeDescriptionDefault
RunEventTriggers the image scaling operation.-
ImageDataThe image to be scaled. Must be a valid Jimp image object.-
FactorNumberThe scaling factor to apply. Values less than 1 shrink the image, values greater than 1 enlarge it.1

Outputs

OutputTypeDescription
DoneEventFires when the scaling operation is complete.
OutputDataThe scaled image as a Jimp image object.

Runtime Behavior and Defaults

When the node receives a Run event, it clones the input image and applies the scale factor using Jimp's scale() method. The original image is not modified; instead, a new scaled image is output.

The default factor is 1, meaning if no factor is provided, the image will be returned at its original size.

Example Usage

To create a thumbnail that is 50% of the original image size:

  1. Connect an image source (such as a Read Image node) to the Image input.
  2. Set the Factor input to 0.5 (or connect a number node with value 0.5).
  3. Trigger the Run event.
  4. The Output will contain the scaled-down image, which can then be passed to other image processing nodes or saved to the library using Write To Library.

To double the size of an image for high-resolution displays, use a factor of 2.