LikeShare Decrypt
Undo the noise — LikeShare Decrypt puts a scrambled image back together
- image
- IMAGE
Some images arrive pre-damaged on purpose. If you've ever pulled a file out of the LikeShare/Tomato-style sharing flow and seen streaks of static instead of a picture, LikeShare Decrypt is the node that fixes it - no key to enter, no API call, no settings at all. It's the restore half of the tiny Miqingzi/likeshare pack, and in practice it's the half you'll actually use: images get scrambled once, on purpose, but every copy you save needs decoding.
What it does
One input, one output. Feed it an image (an IMAGE tensor) and you get the same image back with its pixels put back where they belong. That's the whole node - there are no widgets, no mode selector, no "key" field. The key is baked in and you can't change it, which is the point: this exists for compatibility with the fixed LikeShare flow, not for your own secret scheme.
Wire it however you like. Load a scrambled PNG with a standard LoadImage node, or take the output of the paired LikeShare Encrypt node directly, and send the result into a PreviewImage or SaveImage. It handles batches too - pass a batch of images and every frame comes out restored, same shape in and out.
How the unscramble works
The scramble is a deterministic pixel permutation, and decrypt is literally the inverse of encrypt. The algorithm (a port of the Java TomatoScramble utility) first walks the image's pixels in a 2D Hilbert-curve order - a space-filling curve that visits every pixel exactly once - then rotates that pixel list by an offset computed from the golden-ratio conjugate times the pixel count: round(0.618 * W * H), with a fixed internal key of 1.0. Encrypt shifts pixels forward along that order; Decrypt rotates them the other way. Because it's a pure permutation, the restore is exact and lossless: same code, same dimensions, original image back.
That's the "deterministic reversible Hilbert-curve pixel shuffle" text the node draws on its own canvas - the author's whole pitch in one line.
Where people get burned
- Don't resize between encrypt and decrypt. The shuffle order is built from the image's width and height. Resize the scrambled image and decrypt no longer knows where any pixel came from - you get a permanently still-scrambled mess.
- Lossy formats destroy it. A permutation is exact by construction, so any lossy pass breaks the restore. If a scrambled image has been JPEG'd, screenshotted, or re-encoded, decrypt hands you noise, not the original. Keep scrambled files as lossless PNGs.
- It only undoes its own flow. The key is fixed and public, and this implementation is specific to the LikeShare/Tomato algorithm. A scrambled image from a different tool with a different key won't restore here - you'll just get a different pattern of noise.
- This is not security. Obfuscation, not encryption: the "key" is right there in the open-source code, so anyone can reverse it. It keeps a preview from being casually saved; it does not protect anything that matters.
Install
Easiest route is ComfyUI Manager - open it, search likeshare (it's published to the registry as "LikeShare Image Obfuscator"), install, restart. Or do it by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/Miqingzi/likeshare
Then restart ComfyUI. That's the entire install: there's no requirements.txt, no model downloads, no heavy dependencies. The pack uses only torch and numpy, both of which ComfyUI already ships, plus a tiny JS file that draws the label on the node. One of the rarer custom-node experiences: it just works.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |