Make Image

This function block creates a new image with the dimensions and fill color you provide. It is useful for generating test images, backgrounds, or canvas areas to draw on before further processing.

πŸ“₯ Inputs (sockets)

Width Integer width of the output image in pixels.

Height Integer height of the output image in pixels.

Color Fill color for the image (pixel color). If no color is provided the image is created with a black background.

πŸ“€ Outputs (sockets)

Image Any Generated image with the specified width, height and fill color.

πŸ•ΉοΈ Controls

This function block has no additional GUI controls. Configure the output using the input sockets above.

🎨 Features

  • Quickly generate a blank image canvas of any size.

  • Optional color fill so the canvas can represent backgrounds, masks or reference fields.

  • Simple, deterministic output useful for testing downstream blocks.

πŸ“ How to use

  1. Provide a value to Width and Height to define the canvas size.

  2. Optionally provide a value to Color to set the fill color.

  3. Use the Image Any output as input to other function blocks for visualization, annotation or processing.

πŸ“Š What it does when run

When evaluated, the block produces an image matching the requested dimensions. If a fill color is supplied the image will be uniformly filled with that color; otherwise the image will be blank (black).

πŸ’‘ Tips and Tricks

  • Preview the result by connecting the output to the Show Image block.

  • Create templates or backgrounds and then annotate them with Draw Point, Draw Rectangle or Write Text On Image.

  • Combine several generated images into a montage using Collage Images or merge them with Image Concatenate.

  • Make a canvas and then use Image Resize or Image Padding to match target sizes for other processing blocks.

  • Save generated images directly with Image Write or include them in recordings via Record Video.

πŸ› οΈ Troubleshooting

  • If the output looks empty, double-check that both Width and Height are positive integers.

  • If color does not appear as expected, verify the color input uses the expected color format for the system (provide an RGB/BGR pixel as required by downstream blocks).

  • If downstream blocks expect a different channel order or image depth, use Color Space, Normalize Image, or Image Resizer to adapt the generated image before further processing.

Last updated

Was this helpful?