Similar question here but for Tex -document. Imagemagick shows ways of watermarking here but not how to do it as invisible as possible. I currently just obfuscate some functional elements into photos so extremely hard to remove, without distorting the image itself. Is there some commandline tool to add invisible watermark to images, something like to check with microscope perhaps but still readable? I have a massive tree of images (of very different variety so watermark should adopt to env etc) -- some commandline tool to add watermarks fast invisibly on every photo?
I believe what you're looking for is steganography, a way to hide a message in otherwise innocent-looking content.
outguess, I copy/pasted the text of your question in
$ ../src/outguess/outguess -k 'Unix&Linux' -d Q.txt Tux.jpg Tux_steg.jpg Reading Tux.jpg.... JPEG compression quality set to 75 Extracting usable bits: 10126 bits Correctable message size: 5008 bits, 49.46% Encoded 'Q.txt': 4592 bits, 574 bytes Finding best embedding... 0: 2274(49.2%)[49.5%], bias 2008(0.88), saved: 2, total: 22.46% 3: 2269(49.1%)[49.4%], bias 2007(0.88), saved: 3, total: 22.41% 13: 2268(49.0%)[49.4%], bias 1977(0.87), saved: 3, total: 22.40% 62: 2237(48.4%)[48.7%], bias 1992(0.89), saved: 7, total: 22.09% 78: 2216(47.9%)[48.3%], bias 1964(0.89), saved: 10, total: 21.88% 78, 4180: Embedding data: 4592 in 10126 Bits embedded: 4624, changed: 2216(47.9%)[48.3%], bias: 1964, tot: 10119, skip: 5495 Foiling statistics: corrections: 1437, failed: 746, offset: 198.494881 +- 300.529142 Total bits changed: 4180 (change 2216 + bias 1964) Storing bitmap into data... Writing Tux_steg.jpg.... $ ../src/outguess/outguess -k 'Unix&Linux' -r Tux_steg.jpg out.txt Reading Tux_steg.jpg.... Extracting usable bits: 10126 bits Steg retrieve: seed: 78, len: 574 $ diff out.txt Q.txt $ echo $? 0
Source image (from Tux.svg):
Image with your question hidden inside it:
The images are different if you look closely, but it's pretty much as if the second one had been generated with a higher JPEG compression level. The fact that the complete text of your question is mixed in (and password protected) isn't noticeable visually at all.
The smaller the hidden message, the less visually different the images will be. (I can't distinguish visually between the original and a file with "Copyright YOU 2012" embedded.)
1old, but builds just fine.
2 doesn't build with a modern C++ compiler, a few source fixups are necessary.
There must be a way to embed a quite stable watermark into the image, DigiMark does it e.g. in Photoshop filters - so why shouldn't a command line tool be able to do as well?
This is no solution, but an idea how it may work... if you create an invisible watermark on a blank white image and blend the resulting code into any other image, the watermark-reader is able to extract the wartermark from the resulting image again - even when modified/cropped or printed and photographed again.
So actually batch adding a given watermark gradients code won't be the problem - rather finding an appropriate signing algorithm and sotware to extract the watermark.