You can't screenshot or right click this image
People contact me with all sorts of weird opportunities. Some are fun. Some are not. I've lost count of the number of NFT grifters who've asked me to "revolutionise" the art space. I'm generally not a fan. But I had one chat with someone who wanted to do something intriguing. They were worried about people right-clicking or screenshotting their precious images and had a plan to stop that.
I tried to explain to them that DRM always fails; you can't make data which can't be copied. I explained that artificial scarcity was harmful. They didn't care.
But, their proposed solution was intriguing. And, with their kind permission, I'm posting it here. To be clear, I don't think this is good but I think it is vaguely interesting.
Interlacing
Back in the olden days, video was often interlaced. That is, the TV transmitter would broadcast the odd lines first, then the even lines. Your TV would draw the odd line then, in the millisecond before they faded away from the cathode-ray tube, draw the even lines.
Could we do the same with images?
Let's take this image of a Total Legitimate Bored Ape™
With a scrap of Python, we can knock this into two interlaced images:
Python 3
from PIL import Image
image = Image.open("ape.png")
pixels = image.load()
image.mode = "RGBA"
for y in range(image.height) :
if (y%2 == 1) :
for x in range(image.width) :
pixels[x,y] = (0,0,0,0)
image.save("ape1.png")
for y in range(image.height) :
if (y%2 == 0) :
for x in range(image.width) :
pixels[x,y] = (0,0,0,0)
image.save("ape2.png")
Which gives us:

Using JavaScript the first frame can be rendered onto a <canvas>
element for a millisecond, wiped, and then the second displayed. Repeat.
Here's a demo of it in action - I kinda like the retro effect!
⚠️ Strobe Effect Warning
If you right click on it, you'll only get half the image. If you take a screenshot, you'll only get half the image. FOOLPROOF DRM!!!!!!
Expanding the complexity
Of course, you can scramble an image before unscrambling it to the canvas and all sort of other tricks. You could have dozens of images rendering to the canvas in sequence. You could draw individual pixels programmatically. You could...
None of it matters of course. If you send pixels to a computer screen, they can be copied. It is possible to slow people down - but all it takes is for one person to work out how your scheme works and then it crumbles to dust.
As I said, I have a soft-spot for the shimmery effect. And I think it is kinda fun - in a code-golf way - to design obfuscation schemes.
But using anything like this for a form of digital restrictions management is daft.
301: Let it Snow (Code)! - CSS-Tricks said on :
More comments on Mastodon.