Source for file example_01.php

Documentation is available at example_01.php

  1. <?php
  2. /**
  3. * Crop Example #01
  4. *
  5. * This example shows ...
  6. *
  7. * @filesource
  8. * @package Asido.Examples
  9. * @subpackage Asido.Examples.Crop
  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.png', 'result_01.jpg');
  29.  
  30. /**
  31. * Crop a portion of the image from the upper left corner
  32. */
  33. Asido::Crop($i1, 0, 0, 300, 300);
  34.  
  35. /**
  36. * Save the result
  37. */
  38. $i1->save(ASIDO_OVERWRITE_ENABLED);
  39.  
  40. /////////////////////////////////////////////////////////////////////////////
  41.  
  42. ?>

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