-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
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 ║
╚═══╩═══╩═══╝ ╚═══╩═══╩═══╝
╔═══╦═══╦═══╗ ╔═══╦═══╦═══╗
║ ║ ║ ║ ║ ║ ║ ║
╠═══╬═══╬═══╣ ╠═══╬═══╬═══╣
║ ║ ║ ║ ║ ║ ║ ║
╠═══╬═══╬═══╣ ╠═══╬═══╬═══╣
║ ║ ║ ║ ║ ║ ║ ║
╠═══╬═══╬═══╣ ╠═══╬═══╬═══╣
║ ║ ║ ║ ║ ║ ║ ║
╚═══╩═══╩═══╝ ╚═══╩═══╩═══╝
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 ║
╠═══╬═══╬═══╣ ╠═══╬═══╬═══╣
║ ║ ║ ║ ║ ║ ║ ║
╠═══╬═══╬═══╣ ╠═══╬═══╬═══╣
║ ║ ║ ║ ║ ║ ║ ║
╚═══╩═══╩═══╝ ╚═══╩═══╩═══╝
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.
Metadata
Metadata
Assignees
Labels
No labels

