Source for file example_03.php

Documentation is available at example_03.php

  1. <?php
  2. /**
  3. * Watermark Example #03
  4. *
  5. * This example shows how the watermark scaling works. This feature is turned on
  6. * by default and it is very handy when the watermark image is considerable larger
  7. * then the image that is about to be watermarked.
  8. *
  9. * @filesource
  10. * @package Asido.Examples
  11. * @subpackage Asido.Examples.Watermark
  12. */
  13.  
  14. /////////////////////////////////////////////////////////////////////////////
  15.  
  16. /**
  17. * Include the main Asido class
  18. */
  19. include('./../../class.asido.php');
  20.  
  21. /**
  22. * Set the correct driver: this depends on your local environment
  23. */
  24. asido::driver('gd');
  25.  
  26. /**
  27. * Create an Asido_Image object and provide the name of the source
  28. * image, and the name with which you want to save the file
  29. */
  30. $i1 = asido::image('example.jpg', 'result_03.jpg');
  31.  
  32. /**
  33. * Put the watermark with the scaling feature enabled
  34. */
  35. Asido::watermark($i1, 'watermark_03.png', ASIDO_WATERMARK_BOTTOM_RIGHT, ASIDO_WATERMARK_SCALABLE_ENABLED);
  36.  
  37. /**
  38. * Put the watermark with the scaling feature disabled
  39. */
  40. Asido::watermark($i1, 'watermark_03.png', ASIDO_WATERMARK_CENTER, ASIDO_WATERMARK_SCALABLE_DISABLED);
  41.  
  42. /**
  43. * Save the result
  44. */
  45. $i1->save(ASIDO_OVERWRITE_ENABLED);
  46.  
  47. /////////////////////////////////////////////////////////////////////////////
  48.  
  49. ?>

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