image to extract the watermark from (must be in a supported image format like JPEG, PNG, etc.)
Encode a watermark into an image.
image to be watermarked
number between 0 and 1 indicating how strongly the watermark should be applied
Optionalwatermark: stringoptional bitstring to be encoded, automatically generated if not provided
raw pixel data in RGB8 format (width * height * 3 bytes)
Remove a P/Q watermark from an 8-bit JPEG or PNG, returning an encoded PNG
with the same dimensions and alpha. Requires loadRemover: true.
Removal is lossy and does not guarantee restoration of the original pixels.
Input is limited to 64 MiB, 16,384 pixels per dimension, and 32 million
pixels, with a best-effort 128 MiB decoder allocation budget. Limits are
per call, not a cap on total process memory.
Image metadata (EXIF, XMP, ICC profiles, and C2PA manifests) is not copied.
Existing credentials do not remain valid for the modified pixels; sign a
new manifest to attach valid Content Credentials to the output.
Staticnew
Decode a watermark from an image.