How to Add a Text Watermark to an Image
Provide a nonempty base64-encoded image string, choose the text and display settings, and submit it for processing. When it succeeds, the result is PNG image data with the text rendered over the image.
What this image watermark tool does
This tool places readable text over supplied image data and returns encoded PNG image data when processing succeeds. It suits labels such as a project name, review status, ownership note, or short date. The image is supplied as a string and decoded from base64 before processing, so the starting point is image data in that form rather than a separate watermark image. The supported watermark type here is text. A source image is combined with the selected wording and display settings, then the result is encoded as PNG data.
Before submitting, decide what the label should say and where it should appear. Short wording is easier to place clearly on an image, while opacity and font size let you adjust how prominent the text appears. The tool provides a center placement by default, with corner placements available when the label should stay away from the middle of the image.
Step-by-step instructions
-
Prepare the image input. Convert the source image to a base64-encoded string and provide that string in the image input. Check that the value is nonempty before submitting. Processing does not proceed when the image input is empty.
-
Choose the watermark text. Enter the wording to render over the image. If you do not replace the default, the watermark text is
Watermark. You can use a short label such asInternal DraftorFor Reviewwhen that matches the intended use. -
Set the opacity. The default opacity is
0.5. If you need a different level, use a value from0.0through1.0; the input is limited to that range before it is applied. A lower value makes the rendered text less prominent, while a higher value makes it more prominent as part of the image. -
Select a position. The default position is
center. The supported position values aretop-left,top-right,bottom-left,bottom-right, andcenter. Choose a corner when the middle of the image should remain more open. If another position value is supplied, the center placement is used. -
Set the font size. The default font size is
36. Keep that value when the default sizing suits the image, or provide another font-size value for the text treatment you need. -
Submit the configured image for processing. Provide the nonempty image string together with the selected text, opacity, position, and font size. When processing succeeds, use the returned encoded PNG image data as the resulting watermarked image. Because the successful result is PNG data, it may have a different format from the supplied image.
How to interpret the result
A successful result is encoded as PNG image data. The result therefore represents the processed image in PNG form rather than preserving the source format by default. The rendered text should correspond to the wording and display settings supplied for the operation, including its opacity, position, and font size.
An empty image input is a validation boundary: processing does not proceed in that case, so there is no usable PNG result to interpret. Other failures can occur if the required image-processing dependency is unavailable or if an exception occurs while the image is being decoded, opened, rendered, composited, or encoded. If processing fails at one of those stages, do not treat the response as a completed watermarked image.
The position setting also has a defined fallback. The five listed values receive their named placements; another value uses the center placement. Similarly, opacity is constrained to the range from 0.0 through 1.0 before it is applied. These rules help explain why an output may use a center placement or a bounded opacity when the supplied setting is outside the supported choices.
Worked example
A team labels a draft product image with Internal Draft in the bottom-right corner before sharing it for review.
Provide a nonempty base64-encoded image string, set the text to Internal Draft, choose bottom-right, and submit the configured image for processing.
A successful response contains PNG image data showing the text Internal Draft rendered over the supplied image.
Limitations
- The supported watermark is text, the successful output is PNG image data, and processing may fail during image decoding, opening, rendering, compositing, or encoding, or when the required image-processing dependency is unavailable.
Common errors
- An empty image field prevents processing. Convert the source image to a base64-encoded string, confirm that the string contains data, and submit that nonempty value.
FAQ
Does the tool output a PNG?
When processing succeeds, the result is encoded as PNG image data. The output format is therefore PNG even when the supplied image uses another format.
What text does the watermark use?
The default text is Watermark. Replace it with the wording you want rendered over the supplied image before processing.
Which watermark positions are supported?
The default is center. You can use top-left, top-right, bottom-left, bottom-right, or center; another position value uses the center placement.