Image Blind Watermark
Updated at:2025-11-03
Overview
A blind watermark involves embedding an invisible watermark into media content without altering the visible image. It is commonly used for purposes like copyright protection, content tracking, and anti-counterfeiting. Blind watermarks exhibit the following characteristics:
- Copyright protection. After embedding a text-based blind watermark or a text-based watermark into images, decoding and extraction can be performed on the images to obtain the watermark image, proving copyright information
- Content tracking. The blind watermark function allows adding special identifiers to images. If content is disseminated without permission, the leak source can be traced by decoding and extracting the identifier
Note
- Since the BOS image blind watermark function relies on the MCP service, API call fees incurred during the use of BOS image blind watermark service will be charged by the MCP service. For specific pricing, refer to the Pricing Document of MCP Digital Watermark Service.MCP service digital watermark charge items
- Before using the BOS image blind watermark function, ensure that the MCP audio and video service is activated.MCP service quick start guide
Usage restrictions
- BOS blind watermark service currently only supports buckets in the Beijing, Suzhou, and Guangzhou regions
- Blind watermark images are restricted to formats: PNG, JPG, BMP, JPEG
- To use the blind watermark function, both the width and height of the original image must be greater than 512
- Text-based blind watermark currently supports digits [0 - 9], uppercase and lowercase letters [A - Z, a - z], and common special characters, with a maximum length of 100
- Algorithm 0 can resist scaling, cropping, occlusion, and screenshot attacks but has weak resistance to image compression and a small watermark capacity. Algorithm 1 offers stronger resistance to cropping, occlusion, screenshots, and image compression while supporting a larger watermark capacity, but it cannot resist scaling attacks.
- Maximum input image size: 50 MB; maximum watermark image size: 5 MB
- The algorithm used for embedding and extracting blind watermarks must match; otherwise, the watermark extraction will fail. Algorithm 0 returns an image with no information, while Algorithm 1 produces an empty string.
Algorithm description
- Algorithm 0
- Watermarks are embedded as images. If the content is text, it will be automatically converted into an image before embedding. Whether embedding an image or text, the extracted watermark result will always be an image. The extracted image must be manually verified to determine whether it contains the watermark.
- This algorithm can partially resist scaling, cropping, occlusion, and screenshot attacks, but it is less effective against image compression and has a small watermark capacity. The extracted watermark from attacked images may be slightly blurred or incomplete, depending on the intensity of the attack.
- Algorithm 1
- Only supports embedding text, with the watermarks being stored in encoded format. The extraction result is a plain string.
- This algorithm can resist attacks such as cropping, occlusion, screenshots, and image compression to a certain extent, with a large watermark capacity, but it cannot resist scaling attacks
- Compared to algorithm 0, this algorithm is more user-friendly in text-based embedding scenarios, enabling end-to-end accurate watermark character extraction without manual verification
Blind watermark parameters
Action name: blind-watermark
| Parameters | Value | Description |
|---|---|---|
| method | extract/embed | Differentiate whether this request is for watermark extraction (extract) or watermark embedding (embed). This parameter is required |
| mode | 0/1 | Distinguish whether this request is for a text-based watermark 1 or image-based watermark 0. This parameter is required |
| bucket | - | Specify the name of the BOS bucket where the watermark image is stored. This parameter is optional and defaults to the current bucket. If using a bucket other than the current one, ensure the watermark image in that bucket has public-read permissions. |
| image | - | Specify the object name of the watermark image in BOS, which must be URL-safe Base64 encoded. For image-based watermark embedding, this parameter is mandatory. 1) The original image must have a minimum width and height of 512 pixels. 2) The watermark image must be a binary image with dimensions of 64 × 64 pixels. If these conditions are not met, the image will be resized and processed to conform to service requirements. |
| text | - | The content of the watermark text needs to be url-secure Base64 encoded, and the uncoded content must not exceed 100 characters. The text-based watermark embedding is a required parameter. Text-based blind watermark currently supports digits [0 - 9], uppercase and lowercase letters [A - Z, a - z] |
| algorithm | 0/1 | Algorithm type used for adding blind watermarks: 0 by default |
Example
- Embed text-based blind watermark
- Extract text-based blind watermark
- Embed image-based blind watermark
- Extract image-based blind watermark
