Image Node

Overview
The Image Node is used to define a static image for use with other nodes. It can convert a binary type into an image type. The node requires a media type (PNG, JPEG, or GIF) and a data input.
The data input can be provided in two ways:
- Directly in the node's editor settings, using the image browser.
- Dynamically, by connecting another node to the Image Node's
Datainput port.
The media type can also be provided in two ways:
- Directly in the node's editor settings, using the dropdown menu.
- Dynamically, by connecting another node to the Image Node's
Media Typeinput port.
- Inputs
- Outputs
- Editor Settings
Inputs
| Title | Data Type | Description | Default Value | Notes |
|---|---|---|---|---|
| Data | string | The data to be converted into an image. | (required if if the input toggle for Data is enabled) | The input will be coerced into a string if it is not a string. |
| Media Type | string | The media type of the image (PNG, JPEG, or GIF). | (required if if the input toggle for Media Type is enabled) | The input will be coerced into a string if it is not a string. The value must be one of the following: image/png, image/jpeg, or image/gif. |
Outputs
| Title | Data Type | Description | Notes |
|---|---|---|---|
| Image | image | The image that was created. | None |
Editor Settings
| Setting | Description | Default Value | Use Input Toggle | Input Data Type |
|---|---|---|---|---|
| Media Type | The media type of the image (PNG, JPEG, or GIF). | image/png | Yes | string |
| Image | The data to be converted into an image. | (empty) | Yes | string |
Example 1: Create a static image
- Create an Image Node.
- In the node's editor settings, click on the
Pick Imagebutton. This will open the image browser. - Select an image from the image browser. The selected image will be displayed in the
Imagefield. - Run the graph. The
Imageoutput of the Image Node should contain the selected image.

Error Handling
The Image Node will error if the Data input or the Media Type input is not provided. It will also error if the Data input cannot be converted into an image.
FAQ
Q: Can I use the Image Node to display an image in the Rivet UI?
A: Yes, the Image Node can be used to display an image in the Rivet UI. The image will be displayed in the node's output port when the graph is run.
Q: Can I use the Image Node to convert a binary type into an image?
A: Yes, you can use the Image Node to convert a binary type into an image. You will need to provide the binary data to the Data input of the Image Node and set the Media Type to the appropriate type for the image.
Q: What image formats are supported by the Image Node?
A: The Image Node supports PNG, JPEG, and GIF formats.