Source for file example_02.php

Documentation is available at example_02.php

  1. <?php
  2. /**
  3. * Resize Example #02
  4. *
  5. * This example shows how the proportional resize only by one dimension (width) works
  6. *
  7. * @filesource
  8. * @package Asido.Examples
  9. * @subpackage Asido.Examples.Resize
  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.png');
  29.  
  30. /**
  31. * Resize the image proportionally only by setting only the width, and the height will be corrected accordingly
  32. */
  33. Asido::width($i1, 600);
  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:10 +0300 by phpDocumentor 1.3.0RC4