Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
H

HiddenWatermark

> 编程语言
Open source

Embeds a hidden watermark in an image using a blind DWT-DCT approach

347 stars0 likes1 views
WebsiteGitHub

About

Embeds a hidden watermark in an image using a blind DWT-DCT approach

Hidden Watermark

Embeds a hidden watermark in an image using a blind DWT-DCT approach. Unlike steganographic methods, this hidden watermark is resistant to various forms of attack. Limited to a black and white 32x32 watermark image.

Original Image + Watermark = Watermarked Image

  • =

Image source: http://commons.wikimedia.org/wiki/Garden#/media/File:Rikugien3.jpg

Usage

The following code instantiates the default watermark class with the default watermark image. Then the watermark is embedded in a file, and the watermark is retrieved afterwards.

csharp
var fileBytes = File.ReadAllBytes(imageLocation);
var newFileBytes = Watermark.Default.EmbedWatermark(fileBytes);

var result = Watermark.Default.RetrieveWatermark(newFileBytes);

The following code instantiates the watermark class with the bytes read from a 32x32 watermark image and turns crop support on. Then the watermark is embedded in a file and simultaneously checked if an embedded watermark already exists.

csharp
var watermarkBytes = File.ReadAllBytes(watermarkLocation);
Watermark watermark = new Watermark(watermarkBytes);

var fileBytes = File.ReadAllBytes(imageLocation);
var result = watermark.RetrieveAndEmbedWatermark(fileBytes);

Watermark recovery results

Attack Recovered Watermark
No Attack
Blur
Flip Horizontal
Resize (1024x768->360x270)
Visible Watermarking
Crop
JPEG Quality 20%
Grayscale (not resistant)
PrintScreen
Noise

Acknowledgements

Accord.NET: http://accord-framework.net/

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C#

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言