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

Source for file mask.php

Documentation is available at mask.php

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

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