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

Source for file thumbnail.php

Documentation is available at thumbnail.php

  1. <?php
  2. /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker */
  3. // $Id: thumbnail.php,v 1.1 2006/10/13 12:35:13 firman Exp $
  4.  
  5. // Required package
  6. require_once 'Image/Tools.php';
  7.  
  8. // Available options from request or default values
  9. $options = array(
  10.     'image'   => 'images/pear.png',
  11.     'width'   => 80,
  12.     'height'  => 80,
  13. );
  14.  
  15. // Create thumbnail object
  16. $thumbnail =Image_Tools::factory('thumbnail'$options);
  17. if (PEAR::isError($thumbnail)) {
  18.     die($thumbnail->toString());
  19. }
  20.  
  21. // Create a thumbnail and send the result image to browser
  22. $err $thumbnail->display();
  23. if (PEAR::isError($err)) {
  24.     die($err->toString());
  25. }
  26.  
  27. /*
  28.  * Local variables:
  29.  * mode: php
  30.  * tab-width: 4
  31.  * c-basic-offset: 4
  32.  * c-hanging-comment-ender-p: nil
  33.  * End:
  34.  */
  35. ?>

Documentation generated on Mon, 11 Mar 2019 14:46:58 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.