Make Image

This function block allows users to create a new image with specific dimensions and a defined color, providing a simple way to generate images for various applications.

πŸ“₯ Inputs

Width The desired width of the image in pixels.

Height The desired height of the image in pixels.

Color An optional color value specified in pixel format, which will fill the entire image. If not specified, the image will default to black.

πŸ“€ Outputs

Image Any The generated image based on the specified width, height, and color.

πŸ•ΉοΈ Controls

This block has no interactive controls. The output is entirely controlled by the inputs provided.

🎨 Features

Dynamic Image Creation Users can specify the size and color of the image dynamically through the inputs.

Customizable Color The option to set a specific color allows for different image creation scenarios.

πŸ“ Usage Instructions

  1. Specify Width and Height: Connect numerical inputs for the Width and Height to define the dimensions of the new image.

  2. Set Color (Optional): Optionally, connect a color input to fill the image. If left unconnected, the image will be created in black.

  3. Run the Block: Execute the function block to generate the image. The output will be available for use in subsequent processing steps.

πŸ“Š Evaluation

When executed, this function block produces an image of the specified width and height, filled with the chosen color.

πŸ’‘ Tips and Tricks

Creating Backgrounds

You can use this function to create simple colored backgrounds for presentations or overlays by specifying the desired dimensions and a color.

Using with Other Blocks

This block can be used in conjunction with blocks like Draw Rectangle or Draw Line to generate images that can then be annotated or overlaid with more complex graphics.

πŸ› οΈ Troubleshooting

Invalid Dimensions

Make sure that the values provided for width and height are positive integers. Providing zero or negative values will result in an error.

Color Not Filling Image

If you specify a color and it doesn't fill the image, ensure that the color input is correctly connected and that it is a valid pixel format.

Last updated