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

Source for file test.php

Documentation is available at test.php

  1. <?php
  2. /**
  3.  * This script provides a simple example of using the Image_Resize library and
  4.  * is designed to be used as a test of your setup.
  5.  */
  6. require_once 'Image/Transform.php';
  7. define('IMAGE_TRANSFORM_LIB_PATH''/usr/local/ImageMagick/bin/');
  8. // Change 'IM' to 'GD' to test using the GD library.
  9. $im Image_Transform::factory('IM');
  10. $im->load('Image_Transform/Examples/test.jpg');
  11.  
  12. // next will resize so that the largest length is 300px - height or width
  13. $im->resize(30050);
  14. // next is a subclass call that calls the above with a set size.
  15. $im->addText(array('text' => 'Annotated'));
  16. //$im->display();
  17. $im->save('/www/htdocs/test.jpg');
  18. // Now free the memory - should be called free?
  19. $im->free();
  20. ?>
  21. <img src="test.jpg">

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