Source for file example_04.php

Documentation is available at example_04.php

  1. <?php
  2. /**
  3. * Rotate Example #04
  4. *
  5. * This example shows how to flop an image. Flop means to do a horizontal mirror.
  6. * We are using the `gd_hack` driver since the flipping and flopping is not
  7. * supported by the regular `gd` driver.
  8. *
  9. * @filesource
  10. * @package Asido.Examples
  11. * @subpackage Asido.Examples.Rotate
  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_hack');
  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.png', 'result_04.png');
  31.  
  32. /**
  33. * Flop it ;)
  34. */
  35. Asido::Flop($i1);
  36.  
  37. /**
  38. * Save the result
  39. */
  40. $i1->save(ASIDO_OVERWRITE_ENABLED);
  41.  
  42. /////////////////////////////////////////////////////////////////////////////
  43.  
  44. ?>

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