Don't let anyone get at the image data in the first place. That's pretty much the only reasonably reliable way of doing it. Y'see, there are these things called image processors (sometimes called "paint programs") that are really quite powerful....
That said, one such program at least (the Gimp) does provide a steganography filter, with which you can embed something in the image data and, assuming you don't use a lossy compression scheme like JPEG, will be fairly persistent unless someone messes with the image, in which case the steganographic data would become corrupted.
Doing this in PHP is another matter.