Advertisement
Guest User

lib/images/images.php (tiki12)

a guest
Aug 7th, 2014
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. <?php
  2. // (c) Copyright 2002-2013 by authors of the Tiki Wiki CMS Groupware Project
  3. //
  4. // All Rights Reserved. See copyright.txt for details and a complete list of authors.
  5. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
  6. // $Id: images.php 44444 2013-01-05 21:24:24Z changi67 $
  7.  
  8. /* Select the right library for images manipulation
  9. * We handle gd and imagemagick 1.x and 2.x
  10. */
  11. require_once('tiki-setup.php');
  12.  
  13. // Auto-detect php extension to use as image lib
  14. // This assumes imagick is better than gd (which does not handle transparency in gray PNG), so try to find it first
  15. //
  16. $detected_lib = '';
  17. //if ( class_exists('Imagick') ) {
  18. // $detected_lib = 'imagick_new'; // Imagick 2.x
  19. //} elseif ( function_exists('imagick_rotate') ) {
  20. // $detected_lib = 'imagick_old'; // Imagick 1.x
  21. //} elseif ( function_exists('gd_info') ) {
  22. $detected_lib = 'gd'; // GD
  23. //}
  24.  
  25. if ($detected_lib != '') {
  26. // Load the detected lib
  27. require_once('lib/images/'.$detected_lib.'.php');
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement