What Is Imagewmark?
How do you embed a secret message into an image that survives
cropping, scaling, and compression without needing the original source
to decode it?
Imagewmark is a Free Software tool that does exactly
this. It embeds encrypted invisible digital watermarks (128 bits) into
images using methods based on the paper Local Geometric Distortions
Resilient Watermarking Scheme Based on Symmetry
by Zehua Ma et
al.
Using the same encryption key, you can reconstruct the watermark from modified variants via blind decoding. That is: the original image is not required for extraction.
Everything you need to get started is in the README.md with examples and recommendations for docker builds and test datasets. Detailed command line usage is explained in imagewmark.1.md.
What’s New in 0.6.0
ChangeLog and release assets: Imagewmark v0.6.0
For the full list of changes, see the commit range: v0.5.0…v0.6.0
Highlights:
- C++ based watermark embedding: The embedding algorithm has been reimplemented in C++. It is now significantly faster, uses less memory and all image operations are now based on OpenCV.
- Split architecture: Imagewmark now consists of the new C++ based executable for fast watermark embedding and the original Python program for watermark extraction. The C++ binary automatically delegates to Python for extraction.
- Extended test suite: The test suite runner supports new attack vectors including gamma adjustment and brightness-contrast modifications, a single source seed and reproducible test runs.
Improvements:
- Peak normalization: A new peak normalization step improves grid detection during extraction.
- Customizable test runs: The test suite now supports customizing which attacks to run, as well as shuffling and filtering of the input image sets for representative test image set selections.
- Cornersync/ACNF distinction: The test results now distinguish between cornersync and ACNF detection results, indicating how one improves detection over the other.
- Averaged failure-rate reporting: A test result table with hundreds of images and dozens of attacks can seem confusing, so the test suite results now include an averaged failure rate metric for quick comparison across runs.
- Deterministic testing: All test suite decisions now
depend on a single seed. Metadata of test images is stripped during test
runs so the exact output images are reproducible. The test runner
supports blind decoding and decoding with the original, a new
--without-originalflag has been added to force blind decoding only. - CLI11 update: The C++ command-line parsing library has been included and updated to CLI11.hpp version 2.6.2.
Fixes:
- The
.ppmand.tifimage formats are now properly recognized by the test runner. - Sign preservation in auto-convolution calculation was corrected, a subtle bug that might have affected detection accuracy.
- The distribution and build system has seen several improvements to prevent issues from stale files and automate releases.
- The
--test-keyoption now works correctly with integer keys (#11). - Several test suite fixes were applied for aspect ratio generation, cornersync mode handling, and argument list length limits in the test suite Makefile (#2, #4, #6, #8, #9, #10).
How to Upgrade
Installation: To build and run imagewmark, the following dependencies are required:
apt install build-essential libgcrypt20-dev libopenimageio-dev \
python3-numpy python3-scipy python3-matplotlib python3-imageio \
python3-opencv python3-skimage libopencv-dev
make
make PREFIX=/usr/local installDocker: A dockerized runtime is also available:
docker build -f Dockerfile -t imagewmark-0-6 .
docker run -ti --rm -v $PWD:/data imagewmark-0-6 add in.png out.png 1234
docker run -ti --rm -v $PWD:/data imagewmark-0-6 get out.pngImportant notes:
This release uses C++ based embedding by default. The Python-based
embedding is still available via imagewmark.py add --py if
needed for compatibility testing.
Try it out on your images with two simple add and
get commands:
imagewmark add input.png output.png 00c0ffee0000babe
imagewmark get output.pngIf you encounter edge cases, notice regressions or have feature ideas, please open an issue on the GitHub repository. Your feedback can directly shape the next iteration.
A huge thank-you to everyone who tested, reported issues, and gave feedback!
Happy watermarking! 🚀
Contributors
- Tim Janik (@tim‑janik)
- Stefan Westerfeld (@swesterfeld)