Visual Cryptography
Split a secret image into two random-looking shares that reveal the secret only when stacked together.
Visual cryptography splits a secret picture into two share images. On its own each share is just random black-and-white noise that gives nothing away. Stack the two shares on top of each other and the secret appears. Split a secret below, or combine two existing shares to reveal what they hide.
Split a secret into two shares
Shares are twice the width and height of the secret. Each share alone reveals nothing.
Combine two shares
How it works
The secret image is first reduced to pure black and white using the threshold. Black pixels are the secret ink. Every secret pixel is then expanded into a 2 by 2 block on each share, which is why the shares come out twice as wide and twice as tall.
For each pixel a random 2 by 2 pattern with two black and two white cells is chosen. When the secret pixel is white, both shares get the same pattern, so stacking them leaves a half-filled block that reads as light gray. When the secret pixel is black, the two shares get opposite patterns, so stacking them fills the whole block solid black. That difference in darkness is what makes the secret readable once the shares are overlaid.
Because the pattern in each block is random, a single share carries no information about the secret. Only the relationship between the two shares does. Save the shares as PNG so the exact black-and-white pixels survive without compression artifacts.