StegOnline
StegOnline copied to clipboard
add Channel pixel order
Let's assume that we want to encode 24 bits of data in a 2x2 image.
For now, 2 options are available in the Pixel Ordel list:
Column
Altered bits (using a fictive 4 bits per channel image format, for readability):
r g b r g b
╔═══╦═══╦═══╗ ╔═══╦═══╦═══╗
║ X ║ X ║ X ║ ║ ║ ║ ║
╠═══╬═══╬═══╣ ╠═══╬═══╬═══╣
║ X ║ X ║ X ║ ║ ║ ║ ║
╠═══╬═══╬═══╣ ╠═══╬═══╬═══╣
║ X ║ X ║ X ║ ║ ║ ║ ║
╠═══╬═══╬═══╣ ╠═══╬═══╬═══╣
║ X ║ X ║ X ║ ║ ║ ║ ║
╚═══╩═══╩═══╝ ╚═══╩═══╩═══╝
╔═══╦═══╦═══╗ ╔═══╦═══╦═══╗
║ X ║ X ║ X ║ ║ ║ ║ ║
╠═══╬═══╬═══╣ ╠═══╬═══╬═══╣
║ X ║ X ║ X ║ ║ ║ ║ ║
╠═══╬═══╬═══╣ ╠═══╬═══╬═══╣
║ X ║ X ║ X ║ ║ ║ ║ ║
╠═══╬═══╬═══╣ ╠═══╬═══╬═══╣
║ X ║ X ║ X ║ ║ ║ ║ ║
╚═══╩═══╩═══╝ ╚═══╩═══╩═══╝
Result on an actual image (200x163 image, 73kb of data):
Row
Altered bits:
r g b r g b
╔═══╦═══╦═══╗ ╔═══╦═══╦═══╗
║ X ║ X ║ X ║ ║ X ║ X ║ X ║
╠═══╬═══╬═══╣ ╠═══╬═══╬═══╣
║ X ║ X ║ X ║ ║ X ║ X ║ X ║
╠═══╬═══╬═══╣ ╠═══╬═══╬═══╣
║ X ║ X ║ X ║ ║ X ║ X ║ X ║
╠═══╬═══╬═══╣ ╠═══╬═══╬═══╣
║ X ║ X ║ X ║ ║ X ║ X ║ X ║
╚═══╩═══╩═══╝ ╚═══╩═══╩═══╝
╔═══╦═══╦═══╗ ╔═══╦═══╦═══╗
║ ║ ║ ║ ║ ║ ║ ║
╠═══╬═══╬═══╣ ╠═══╬═══╬═══╣
║ ║ ║ ║ ║ ║ ║ ║
╠═══╬═══╬═══╣ ╠═══╬═══╬═══╣
║ ║ ║ ║ ║ ║ ║ ║
╠═══╬═══╬═══╣ ╠═══╬═══╬═══╣
║ ║ ║ ║ ║ ║ ║ ║
╚═══╩═══╩═══╝ ╚═══╩═══╩═══╝
Result:
Channel
And here is my proposal: iterating over channels instead rows or columns:
Altered bits:
r g b r g b
╔═══╦═══╦═══╗ ╔═══╦═══╦═══╗
║ X ║ X ║ X ║ ║ X ║ X ║ X ║
╠═══╬═══╬═══╣ ╠═══╬═══╬═══╣
║ X ║ X ║ X ║ ║ X ║ X ║ X ║
╠═══╬═══╬═══╣ ╠═══╬═══╬═══╣
║ ║ ║ ║ ║ ║ ║ ║
╠═══╬═══╬═══╣ ╠═══╬═══╬═══╣
║ ║ ║ ║ ║ ║ ║ ║
╚═══╩═══╩═══╝ ╚═══╩═══╩═══╝
╔═══╦═══╦═══╗ ╔═══╦═══╦═══╗
║ X ║ X ║ X ║ ║ X ║ X ║ X ║
╠═══╬═══╬═══╣ ╠═══╬═══╬═══╣
║ X ║ X ║ X ║ ║ X ║ X ║ X ║
╠═══╬═══╬═══╣ ╠═══╬═══╬═══╣
║ ║ ║ ║ ║ ║ ║ ║
╠═══╬═══╬═══╣ ╠═══╬═══╬═══╣
║ ║ ║ ║ ║ ║ ║ ║
╚═══╩═══╩═══╝ ╚═══╩═══╩═══╝
Result:
This is an interesting feature as it better hides the data in the image (since it avoids to visually see the difference between untouched an altered areas), and improve global image quality.
Hi! Thank you for your suggestion. This would definitely be an interesting feature, and I would love to include this in the next release. However, it seems a bit tricky from a UI standpoint -- any ideas on this?
I was thinking about a third option in the Pixel Ordel list, which could then be renamed differently, like "byte ordering", or "iterate over...".
Hi, on further thought, isn't this already implemented via the following config?
EDIT: The inverse should be selected ^
No, this produces an image with altered pixels on top of the image. What I suggest is to distribute altered pixels on the whole image.
On my test scenario, 7 on 8 bits must be altered in order to encode the whole data in the image (this way we can clearly see the difference in the image).
So, with pixel order = row, bit order = MSB, bit plane order = rgb, pad remaining bits = no, and these options:
⬜ ⬜ ⬜
☑️ ☑️ ☑️
☑️ ☑️ ☑️
☑️ ☑️ ☑️
☑️ ☑️ ☑️
☑️ ☑️ ☑️
☑️ ☑️ ☑️
☑️ ☑️ ☑️
produce this:
And these options:
☑️ ☑️ ☑️
☑️ ☑️ ☑️
☑️ ☑️ ☑️
☑️ ☑️ ☑️
☑️ ☑️ ☑️
☑️ ☑️ ☑️
☑️ ☑️ ☑️
⬜ ⬜ ⬜
produce this:
Here are my test data:
input: Le Désespéré, Gustave Courbet
image file to encode: The Starry Night, Vincent van Gogh