Image_Tools
[ class tree: Image_Tools ] [ index: Image_Tools ] [ all elements ]

Source for file swap.php

Documentation is available at swap.php

  1. <?php
  2. /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker */
  3. // CVS: $Id: swap.php,v 1.1 2005/10/02 17:53:00 firman Exp $
  4.  
  5. /**
  6.  * Require the swap tool
  7.  */
  8. require_once 'Image/Tools.php';
  9.  
  10. $options = array(
  11.     'image' => 'images/pear.png'
  12. );
  13.  
  14. // Create new Image_Tools_Swap object instance
  15. $tool =Image_Tools::factory('swap'$options);
  16. if (PEAR::isError($tool)) {
  17.     die($tool->toString());
  18. }
  19.  
  20. // Swap the image channel colors and send the result image to browser
  21. $err $tool->display();
  22. if (PEAR::isError($err)) {
  23.     die($err->toString());
  24. }
  25.  
  26. /*
  27.  * Local variables:
  28.  * mode: php
  29.  * tab-width: 4
  30.  * c-basic-offset: 4
  31.  * c-hanging-comment-ender-p: nil
  32.  * End:
  33.  */
  34. ?>

Documentation generated on Thu, 23 Nov 2006 18:00:07 -0500 by phpDocumentor 1.3.0. PEAR Logo Copyright © PHP Group 2004.