# Write Text On Image

This function block allows users to overlay customizable text onto an image. It provides controls for font size, position, color, and thickness of the text, making it versatile for various use cases like annotations or watermarks.

## 📥 Inputs <a href="#inputs" id="inputs"></a>

`Image Any` The input image onto which the text will be written.

`String` The text string that will be overlaid on the image.

## 📤 Outputs <a href="#outputs" id="outputs"></a>

`Image Any` The output is the modified image that includes the overlaid text.

## 🕹️ Controls <a href="#controls" id="controls"></a>

`Horizontal Position Slider` Adjusts the horizontal position of the text on the image.

`Vertical Position Slider` Adjusts the vertical position of the text on the image.

`Font Scale Slider` Allows for adjustment of the size of the text.

`Text Thickness Slider` Adjusts the thickness of the font used for the text.

`Font Selector` A dropdown menu for choosing the desired font type for the text.

`Color Selector` A control for selecting the color of the text.

## 🎨 Features <a href="#features" id="features"></a>

`Customizable Text Overlay` Provides users with the flexibility to adjust and customize text placement, size, color, and type, allowing for tailored annotations.

`Dynamic Updates` As adjustments are made via the controls, the text placement and appearance can be updated instantly, providing immediate visual feedback.

## 📝 Usage Instructions <a href="#usage" id="usage"></a>

1. **Input Image**: Connect the image you wish to annotate to the `Image Any` input.
2. **Enter Text**: Provide the desired text string to the `String` input.
3. **Adjust Settings**: Use the various sliders and selectors to customize the text’s position, size, thickness, font, and color.
4. **Evaluate the Block**: Run the function block to generate the output image with the overlaid text.

## 📊 Evaluation <a href="#evaluation" id="evaluation"></a>

Upon execution, this function block will produce a new image with the specified text overlaid as per the user-defined settings.

## 💡 Tips and Tricks <a href="#tips-and-tricks" id="tips-and-tricks"></a>

<details>

<summary>Choosing the Right Font Size</summary>

Experiment with various font scales to find the most readable size for your specific image resolution. Generally, larger images may benefit from larger fonts, while small images may require smaller fonts.

</details>

<details>

<summary>Utilizing Position Sliders</summary>

To ensure the text stands out, position it away from busy image areas or object edges. The horizontal and vertical sliders provide a convenient way to adjust this dynamically.

</details>

## 🛠️ Troubleshooting <a href="#troubleshooting" id="troubleshooting"></a>

<details>

<summary>Text Not Visible</summary>

If the text appears missing on the image, check the color selection and ensure it's contrasting with the background. Adjust the font scale or position to ensure visibility.

</details>

<details>

<summary>Incorrect Text Scaling</summary>

If the text size does not appear as expected, verify the settings of the font scale slider and ensure the output image is of a sufficient resolution for text rendering.

</details>
