Source for file example_02.php

Documentation is available at example_02.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_02.jpg');
  29.  
  30. /**
  31. * Copy the image with over the resulting image
  32. */
  33. Asido::copy($i1, 'copy_01.png', 15, 15);
  34.  
  35. /**
  36. * Copy an image using negative coordinates
  37. */
  38. Asido::copy($i1, 'copy_02.jpg', -35, -35);
  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:09 +0300 by phpDocumentor 1.3.0RC4