Source for file example_04.php

Documentation is available at example_04.php

  1. <?php
  2. /**
  3. * Watermark Example #04
  4. *
  5. * This example shows how the watermark scaling factor works.
  6. *
  7. * @filesource
  8. * @package Asido.Examples
  9. * @subpackage Asido.Examples.Watermark
  10. */
  11.  
  12. /////////////////////////////////////////////////////////////////////////////
  13.  
  14. /**
  15. * Include the main Asido class
  16. */
  17. include('./../../class.asido.php');
  18.  
  19. /**
  20. * Set the correct driver: this depends on your local environment
  21. */
  22. asido::driver('gd');
  23.  
  24. /**
  25. * Create an Asido_Image object and provide the name of the source
  26. * image, and the name with which you want to save the file
  27. */
  28. $i1 = asido::image('example.jpg', 'result_04.jpg');
  29.  
  30. /**
  31. * Put the watermark with the scaling factor 0.66
  32. */
  33. Asido::watermark($i1, 'watermark_04.png', ASIDO_WATERMARK_TOP_LEFT, ASIDO_WATERMARK_SCALABLE_ENABLED, 0.66);
  34.  
  35. /**
  36. * Put the watermark with the scaling factor 0.75
  37. */
  38. Asido::watermark($i1, 'watermark_04.png', ASIDO_WATERMARK_BOTTOM_RIGHT, ASIDO_WATERMARK_SCALABLE_ENABLED, 0.75);
  39.  
  40. /**
  41. * Save the result
  42. */
  43. $i1->save(ASIDO_OVERWRITE_ENABLED);
  44.  
  45. /////////////////////////////////////////////////////////////////////////////
  46.  
  47. ?>

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