02-23-2024, 05:44 PM
(02-23-2024, 05:31 PM)a740g Wrote: Nice. I'll try this when I get off work.Yes, you could use it to watermark an image. The alpha channel of each pixel is slightly altered to hold the string data. A pixel's alpha value of 255 equates to a 1 and a value of 254 equates to a 0. To the naked eye the slight change is imperceptible.
So, this is like a watermark in the image? From a quick glance at the code, it seems it is getting the info from the alpha channel.
It's best to use images, such as photographs, that are opaque (all alpha values are 255). You wouldn't want to use these routines on images where the alpha channel is important, such as sprites or sprite sheets that contain transparency, unless the code you write to use these routines takes this into account.