views:

3083

answers:

8

I want to insert multiple invisible watermarks into my JPEG pictures through C# code. That means that I need a .NET library that does this work and not some external batch application.

Any suggestions?

+3  A: 

there is a port of image magick library to c# , and it can easily perform that operation for you...

Reflog
+4  A: 

Storing "invisible" data in pictures is known as "steganography". A Google-search for "steganography .net" yields this article as its top hit - might prove useful.

Matt Hamilton
A: 

This article on devx.com contains a library (Stego) with source code you could use:

Keeping Secrets Secret: Steganography with .NET

After implementing that API, it's trivial to hide a message inside a .bmp file:

   ICoverFile cover = new BMPCoverFile("cover.bmp");
   cover.CreateStegoFile("stego.bmp","Hello","MyPwd");

Likewise, you can extract the message just as easily:

   IStegoFile stego = new 
      BMPStegoFile("stego.bmp","MyPwd");
   Console.WriteLine(stego.HiddenMessage);

UPDATE: Oh, sorry. Matt linked to the same article... didn't see that while writing this answer.

splattne
A: 

Steganography is suitable for BMPs only and it's very volatile.

As I wrote in the first post, I need a library that works with JPEGs and that adds invisible watermarks into them.

toncidamjanic
Steganography is applicable to many other formats besides BMP.
Lance Fisher
But there are complications regarding lossy formats such as JPEGs from what I understand. I think toncidamjanic may have a point. I would suggest that his comment should have been added as a comment to an answer or as an edit to his original post however instead of creating an additional answer post.
jpierson
+2  A: 

What is the purpose of this? Is it to enable you to identify JPGs that have been taken from your site?

Response in comments: "Yes, I want to protect my pictures by using some robust and invisible watermark. Semi-visible site logo is not an option... "

The problem is precisely the one described in discussion of Steganography above, to do with the robustness of the image.

Any watermark like the one you describe can be used to identify a direct copy of the whole image, but with a jpg it seems to me that if it is even opened and saved again in an editor there is a chance of a change in compression affecting the watermark. Also if someone was to steal your image and do something more extensive with it- tinker with the colour balance, crop it a little and so on it seems unlikely that any invisible watermarking would be robust enough to survive and stay recogniseable.

Unfortunately I don't have a solution here, but the problem itself is far from trivial. It may be worth looking for other approaches to it, that you can perhaps use in parallel with watermarking ( custom metadata perhaps? preventing images being easily saved? ) to make it harder for your images to be stolen or to make them less valuable if they are...

glenatron
Yes, I want to protect my pictures by using some robust and invisible watermark. Semi-visible site logo is not an option...
toncidamjanic
this should be a comment, not an answer!
balexandre
There are a few invisible watermark solutions for JPEG format. Most of them modify the discrete cosine transformation values.As I don't have time to program it myself, I need a working solution out of the box. So, I'm looking for a suggestion, such as mentioned MagickNet library...
toncidamjanic
@toncidamjanic: be aware that the last time i checked (over a year ago) such solutions had been cracked
Steven A. Lowe
@steven: well, they may be cracked if you know what to look for. Most of watermarks are unnoticeable noise inserted into the picture which cannot be easily detected by brute force.
toncidamjanic
+1  A: 

If it is a important application that you are working on, why not trying a paid service?

Digimarc and Signumtech can give you that kind of support using their SDK.

balexandre
Yes, a paid solution is also an option. I just need a well-done and well-tested library.
toncidamjanic
A: 

Look at CodeGlobe there is a good article on image watermarking in c#

A: 

I have done using grImage.DrawImage(waterMarkFile, X, Y). It wirites the transparent image on top but I could not find the exact X, Y point in it. If anyone has this code, please post. thanks

wholesale clothing