You are browsing as a guest. Sign up (or log in) to start making projects!

Open comments for this post

1h 56m 42s logged

Devlog 3 — the decoder!

This one took more thinking than I expected. The decoder has to follow the exact same path as the encoder: same starting corner, same row-by-row order, otherwise it reads the wrong pixels and gets messy. The trickiest part was the stop signal logic. The decoder reads Red values one by one and asks “is this a 0?” at every pixel. If yes, stop and convert everything collected so far back to text. If no, keep going. Sounds simple but getting the edge cases right (what if the image has no message at all? what if it hits the end without finding a stop?) took a few tries.
When I finally ran encode → decode end to end and saw my message come back perfectly that was a relief.

0
2

Comments 0

No comments yet. Be the first!