Magick.NET and creating a hidden text watermark

90 Views Asked by At

Is there a way to create a hidden watermark text so we can verify if our images were copied on another site in the future? We are currently playing around with this code below but it just writes the text all over the image, instead of it being hidden and not seen. Is there anything other then a watermark I can do to handle this situation with Magick.NET?

The below code doesn't seem to be getting 0 back on new file.

     using (var message = new MagickImage("label:© Events", 200, 20))
 {
     using (var image = new MagickImage(imagePath))
     {
         image.Stegano(message);
         image.Write(imageSteganoPath);

         var settings = new MagickReadSettings();
         settings.Format = MagickFormat.Stegano;
         settings.Width = 200;
         settings.Height = 20;

         using (var hiddenMessage = new MagickImage(imageSteganoPath, settings))
         {
             Assert.AreEqual(0, message.Compare(hiddenMessage, ErrorMetric.RootMeanSquared));
         }
     }
 }
0

There are 0 best solutions below