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
| Input | Type | Description | Default |
|---|---|---|---|
| Image | Image | The image object to extract dimensions from. Accepts image objects from nodes like Read Image, Screenshot Webpage, or AI Generate Image. | - |
Outputs
| Output | Type | Description |
|---|---|---|
| Width | Number | The width of the image in pixels. |
| Height | Number | The 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:
- Use a Read Image node to load an image from the library.
- Connect the Read Image output to the Image input of the Image Size node.
- 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.