Or technically, the idea crossed my mind, I realized it would still work by chance, and then forgot to mention it :)
The significance went right over my head.
But, I'm really impressed that vr picked up on it. It is so nice to see an OP applying their own thought processes to the posted code, rather than using it verbatim and then blaming us for not having considered every last nuance and detail of their problem, if it goes wrong.
I really like your offset-and-xor technique. It is similar to a process I've used for edge detection in images in the past.
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
In the absence of evidence, opinion is indistinguishable from prejudice.