Source for file example_05.php

Documentation is available at example_05.php

  1. <?php
  2. /**
  3. * Watermark Example #05
  4. *
  5. * This example shows the result when using non-transparent images like JPEGs, or
  6. * using files with non-alpha transparency like GIFs.
  7. *
  8. * @filesource
  9. * @package Asido.Examples
  10. * @subpackage Asido.Examples.Watermark
  11. */
  12.  
  13. /////////////////////////////////////////////////////////////////////////////
  14.  
  15. /**
  16. * Include the main Asido class
  17. */
  18. include('./../../class.asido.php');
  19.  
  20. /**
  21. * Set the correct driver: this depends on your local environment
  22. */
  23. asido::driver('gd');
  24.  
  25. /**
  26. * Create an Asido_Image object and provide the name of the source
  27. * image, and the name with which you want to save the file
  28. */
  29. $i1 = asido::image('example.jpg', 'result_05.jpg');
  30.  
  31. /**
  32. * Put a JPEG watermark image
  33. */
  34. Asido::watermark($i1, 'watermark_05.jpg', ASIDO_WATERMARK_TOP_LEFT);
  35.  
  36. /**
  37. * Put a GIF watermark image
  38. */
  39. Asido::watermark($i1, 'watermark_05.gif', ASIDO_WATERMARK_BOTTOM_RIGHT);
  40.  
  41. /**
  42. * Save the result
  43. */
  44. $i1->save(ASIDO_OVERWRITE_ENABLED);
  45.  
  46. /////////////////////////////////////////////////////////////////////////////
  47.  
  48. ?>

Documentation generated on Mon, 09 Apr 2007 23:57:11 +0300 by phpDocumentor 1.3.0RC4