Skip to main content

Image Size

Uncontrolled node

Overview

The Image Size node extracts the width and height dimensions from an image object. This is useful for dynamically adjusting layouts, validating image specifications, or passing dimension data to other image processing nodes such as Resize Image or Crop Image.

Inputs

InputTypeDescriptionDefault
ImageImageThe image object to extract dimensions from. Accepts image objects from nodes like Read Image, Screenshot Webpage, or AI Generate Image.-

Outputs

OutputTypeDescription
WidthNumberThe width of the image in pixels.
HeightNumberThe height of the image in pixels.

Runtime Behavior

This is an uncontrolled node, meaning it executes automatically whenever the input image changes.

The node expects a valid image object (internally represented as a Jimp image). If the input is not a valid image object, both the Width and Height outputs will return an error object indicating that the input is not an image.

The dimensions are extracted from the image's bitmap data and returned as numeric values representing pixels.

Example

A common use case is to check the dimensions of an image before processing it:

  1. Use a Read Image node to load an image from the library.
  2. Connect the Read Image output to the Image input of the Image Size node.
  3. Connect the Width and Height outputs to a Show node to display the dimensions, or use them in a Compare node to validate that the image meets specific size requirements before passing it to a Resize Image node.