Load & Resize Image
KJNodes/image
LoadAndResizeImageExample
JSON Example
{
"class_type": "LoadAndResizeImage",
"inputs": {
"image": "https://example.com/input-image.png",
"resize": false,
"width": 512,
"height": 512,
"repeat": 1,
"keep_proportion": false,
"divisible_by": 2,
"mask_channel": "alpha",
"background_color": ""
}
}This example shows required inputs only. Connection values like ["node_id", 0] should reference actual node IDs from your workflow.
Inputs
| Name | Type | Status | Constraints | Default |
|---|---|---|---|---|
image | ENUM1 options
| required | - | - |
resize | BOOLEAN | required | - | false |
width | INT | required | min: 0, max: 16384, step: 8 | 512 |
height | INT | required | min: 0, max: 16384, step: 8 | 512 |
repeat | INT | required | min: 1, max: 4096, step: 1 | 1 |
keep_proportion | BOOLEAN | required | - | false |
divisible_by | INT | required | min: 0, max: 512, step: 1 | 2 |
mask_channel? | ENUM4 options
| required | - | - |
background_color? | STRING | required | - | "" |
Outputs
| Index | Name | Type | Is List | Connection Reference |
|---|---|---|---|---|
0 | image | IMAGE | No | ["{node_id}", 0] |
1 | mask | MASK | No | ["{node_id}", 1] |
2 | width | INT | No | ["{node_id}", 2] |
3 | height | INT | No | ["{node_id}", 3] |
4 | image_path | STRING | No | ["{node_id}", 4] |
How to connect to these outputs
To connect another node's input to an output from this node, use the connection reference format:
["node_id", output_index]Where node_id is the ID of this LoadAndResizeImage node in your workflow, and output_index is the index from the table above.
Example
If this node has ID "5" in your workflow:
image (IMAGE):["5", 0]mask (MASK):["5", 1]width (INT):["5", 2]
Was this page helpful?