&reftitle.examples;
PNG creation with PHP PNG creation with PHP ]]> This example would be called from a page with a tag like: <img src="button.php?text=text">. The above button.php script then takes this "text" string and overlays it on top of a base image which in this case is "images/button1.png" and outputs the resulting image. This is a very convenient way to avoid having to draw new button images every time you want to change the text of a button. With this method they are dynamically generated.
Adding watermarks to images using alpha channels Adding watermarks to images using alpha channels ]]> Adding watermarks to images using alpha channels This example is a common way to add watermarks and stamps to photos and copyrighted images. Note that the presence of an alpha channel in the stamp image as the text is anti-aliased. This is preserved during copying.
Using <function>imagecopymerge</function> to create a translucent watermark Using <function>imagecopymerge</function> to create a translucent watermark ]]> Using imagecopymerge() to create a translucent watermark This example uses imagecopymerge to merge the stamp with our original image. Using this we can set the opacity of our stamp - in our example we've set it to 50% opacity (another term for transparency). In practice this would be useful in copyright protection as semi-transparent watermarks are hard to remove yet allow viewers to see the image.