Blind watermark

Blind watermark

You can use a text or image for a blind watermark, the Apose.CAD library provides all the necessary tools for adding and checking blind watermarks

Using text for a blind watermark

Example code:

// Text embedding and validation
string inputFileName = "Tyrannosaurus.dxf";
string embeddedFileName = "Tyrannosaurus_embedded.dxf";
// Watermark data
string watermarkText = "The grass grows and the orioles fly";
// Embed
var inputImage = Image.Load(inputFileName);
bool embedSuccess = inputImage.WatermarkGuardService.EmbedText(watermarkText);
inputImage.Save(embeddedFileName, new DxfOptions());
// Validate
var embeddedImage = Image.Load(embeddedFileName);
bool validateSuccess = embeddedImage.WatermarkGuardService.ValidateText(watermarkText);

A file with a text blind mark

An example of the appearance of a file using text for a blind watermark.

  1. The file before adding the text blind watermark
    Input image
  2. The result of adding the text blind watermark
    Embedded image

Using another image as a blind watermark

Example code:

string inputFileName = "robot_handling_cell.dxf";
string watermarkFileName = "Clock-Icon.png";
string embeddedFileName = "robot_handling_cell_embedded.dxf";
// Watermark data
var watermarkStream = new MemoryStream(File.ReadAllBytes(watermarkFileName));
// Embed
var inputImage = Image.Load(inputFileName);
bool embedSuccess = inputImage.WatermarkGuardService.EmbedImage(watermarkStream);
inputImage.Save(embeddedFileName, new DxfOptions());
// Validate
var embeddedImage = Image.Load(embeddedFileName);
bool validateSuccess = embeddedImage.WatermarkGuardService.ValidateImage(watermarkStream);

Adding another image as a blind watermark

An example of a file view using another image to add a blind watermark.

  1. The file before adding the image as a blind watermark
    Input image
  2. The result after adding the image as a blind watermark
    Embedded image