Write Date On Image

This function block writes the current date and time as text onto an incoming image. It provides flexible controls for font, size, position, color and an optional background for better readability. Use this block when you need timestamped images for logging, recording or visual feedback.

πŸ“₯ Inputs

Image Any Image to receive the date overlay (any color/depth image).

πŸ“€ Outputs

Image Any Image with the date/time text drawn on it.

πŸ•ΉοΈ Controls

Font Scale Adjusts the relative size of the date text. This value scales automatically with image dimensions so the text remains proportional.

Horizontal Position Move the text left-to-right across the image (normalized slider).

Vertical Position Move the text top-to-bottom across the image (normalized slider).

Font Thickness Change the stroke thickness of the text.

Text Background Toggle a filled background rectangle behind the text to improve contrast and readability.

Font Choose the text style from available font options (e.g., Simplex, Duplex, Script).

Color Select the text color from a preset palette.

🎨 Features

  • Adjustable, image-aware font scaling so text size adapts to different image resolutions.

  • Precise placement using horizontal and vertical normalized sliders.

  • Multiple font styles and color presets for quick configuration.

  • Optional translucent background box behind text for high contrast on busy scenes.

  • Real-time preview when the block is executed so you can fine tune placement and visibility.

πŸ“ Usage Instructions

  1. Connect an image-producing block to the Image Any input.

  2. Adjust Font Scale, Horizontal Position and Vertical Position to place the timestamp where you want it.

  3. Pick a Font and Color that are visible over your image.

  4. Optionally enable Text Background to ensure legibility on complex backgrounds.

  5. Run the flow; the block outputs the image with the current date/time applied.

The written timestamp uses a compact date-time format (date and time combined) so it is suitable for file names and quick visual inspection.

πŸ“Š Evaluation

When executed, the block overlays the current date and time text onto the provided image and returns the modified image through its output socket. The overlay is updated each run to reflect the current moment.

πŸ’‘ Tips and Tricks

  • To preview results in the editor UI, connect the output to the Show Image block.

  • If you save many timestamped images, pair this block with Image Logger or Image Write to store images with the overlay applied.

  • For video recording workflows, send the output to Record Video so each recorded frame contains the timestamp.

  • When working with very large images, use Image Resize before this block to reduce rendering time while still producing readable text.

  • If you need to overlay other information (IDs, counters) alongside the date, combine this block with blocks that produce text or numbers and apply multiple write/overlay steps.

πŸ› οΈ Troubleshooting

  • Text appears off-image: adjust Horizontal Position and Vertical Position to bring the text back into view.

  • Text is hard to read on busy backgrounds: enable Text Background or choose a contrasting Color.

  • Text too small or too large: tweak Font Scale and/or Font Thickness until legible.

  • Slow processing on large images: insert an Image Resize block before this block, then write the date on the resized image or resize back afterward if needed.

Last updated