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

Source for file blend.php

Documentation is available at blend.php

  1. <?php
  2. /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker */
  3. // $Id: blend.php,v 1.1 2008/05/26 03:03:26 firman Exp $
  4.  
  5. /**
  6.  * Image_Tools
  7.  */
  8. require_once 'Image/Tools.php';
  9.  
  10. // creates an intance of Blend tool object
  11. $blend Image_Tools::factory('blend');
  12.  
  13. // sets the options
  14. $blend->set('image1'dirname(__FILE__'/images/3dgirl.jpg');
  15. $blend->set('image2'dirname(__FILE__'/images/blending.png');
  16. $blend->set('x'0);
  17. $blend->set('y'65);
  18.  
  19. // apply the blend into the image
  20. if (isset($_GET['mode'])) {
  21.     $blend->set('mode'$_GET['mode']);
  22. }
  23.  
  24. // display the result image
  25. $res $blend->display(IMAGETYPE_JPEG);
  26. if (PEAR::isError($res)) {
  27.     echo $res->getMessage();
  28. }

Documentation generated on Mon, 11 Mar 2019 15:22:20 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.