Version 3.1.4

This commit is contained in:
Neo committed 2025-12-19 00:32:22 -08:00
1 parent 1d4720f3e2
commit ae5c01cc78
2563 files changed
+283048 -240689

No files matched your search

+39 -8
View File
@@ -1,18 +1,21 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.0.5
* IP.Board v3.1.4
* Image Handler: create thumbnails, apply watermarks and copyright tests, save or display final image
* Last Updated: $Date: 2009-06-12 22:35:26 -0400 (Fri, 12 Jun 2009) $
* Last Updated: $Date: 2010-11-10 11:27:28 -0500 (Wed, 10 Nov 2010) $
* </pre>
*
* @author $Author: bfarber $
* @author $Author: mmecham $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.iinvisionpower.com/community/board/license.html
* @package Invision Power Services Kernel
* @link http://www.iinvisionpower.com
* @license http://www.invisionpower.com/community/board/license.html
* @package IP.Board
* @subpackage Kernel
* @link http://www.invisionpower.com
* @since Monday 5th May 2008 14:00
* @version $Revision: 282 $
* @version $Revision: 485 $
*
* GD Example
* <code>
@@ -36,6 +39,34 @@
* </code>
*/
/**
* Bootstrapper
* Picks GD or imagemagik
*/
class ips_kernel_image
{
/**
* Loads correct class
* @param string $load
* @return Ambigous <classImageImagemagick, classImageGd>
*/
static public function bootstrap( $load='gd' )
{
if ( $load == 'im' )
{
require_once( IPS_KERNEL_PATH . 'classImageImagemagick.php' );
$img = new classImageImagemagick();
}
else
{
require_once( IPS_KERNEL_PATH . 'classImageGd.php' );
$img = new classImageGd();
}
return $img;
}
}
/**
* Image interface
*
@@ -266,7 +297,7 @@ abstract class classImage
// Is the current image already smaller?
//---------------------------------------------------------
if( $width > $this->cur_dimensions['width'] AND $height > $this->cur_dimensions['height'] )
if( $width >= $this->cur_dimensions['width'] AND $height >= $this->cur_dimensions['height'] )
{
$this->error = 'already_smaller';
return false;