Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

phpblog@developerWorks:
More on Image Manipulation
Jul 08, 2005 @ 11:48:15

On the IBM phpblog@developerWorks today, there's another post from Ken Coar with a brief look at watermarking images on a site via PHP.

At the suggestion of a friend, I added yet another twist to my watermarking script: rotating the watermark a random amount each time.

While cool in theory, it turns out that the practice is a little more difficult. For one thing, PHP's ImageRotate() function creates a new image resource sized large enough to hold the entire rotated image.

For another thing, getting ImageRotate() to do the Right Thingâ„¢ with the transparency is turning out to be a hassle. When it's finished, or at least far enough along, I'll post more technical details

I can understand the want to put watermarks on images, but, in my opinion, this should be reserved for the "stock photo" kind of site (or other sites where the main focus is the images) and not just any other site out there where the developer's afraid of someone stealing their images.

Now, a good trick would be to get Apache to pass any direct JPG/GIF/PNG request back through a PHP script that would apply the watermark to it....

tagged:

Link:


Trending Topics: