Vergleich inc/functions_image.php - 1.4.1 - 1.4.14

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * $Id: functions_image.php 4101 2008-08-10 18:52:38Z Tikitiki $

 * $Id: functions_image.php 4742 2010-01-27 07:43:01Z RyanGordon $

 */

/**

 */

/**

Zeile 26Zeile 26
		$thumb['code'] = 3;
return $thumb;
}

		$thumb['code'] = 3;
return $thumb;
}

	list($imgwidth, $imgheight, $imgtype, $imgattr, $imgbits, $imgchan) = getimagesize($file);









	
$imgdesc = getimagesize($file);
$imgwidth = $imgdesc[0];
$imgheight = $imgdesc[1];
$imgtype = $imgdesc[2];
$imgattr = $imgdesc[3];
$imgbits = $imgdesc['bits'];
$imgchan = $imdesc['channels'];


	if($imgwidth == 0 || $imgheight == 0)
{
$thumb['code'] = 3;

	if($imgwidth == 0 || $imgheight == 0)
{
$thumb['code'] = 3;

Zeile 102Zeile 110
			$filename = str_replace(".gif", ".jpg", $filename);
}
switch($imgtype)

			$filename = str_replace(".gif", ".jpg", $filename);
}
switch($imgtype)

		{

		{

			case 1:
if(function_exists("imagegif"))
{

			case 1:
if(function_exists("imagegif"))
{

Zeile 159Zeile 167
	if($matches[1] && $matches[2])
{
switch($matches[2])

	if($matches[1] && $matches[2])
{
switch($matches[2])

		{

		{

			case "k":
$memory_limit = $matches[1] * 1024;

			case "k":
$memory_limit = $matches[1] * 1024;

				break;

				break;

			case "m":
$memory_limit = $matches[1] * 1048576;
break;
case "g":
$memory_limit = $matches[1] * 1073741824;

			case "m":
$memory_limit = $matches[1] * 1048576;
break;
case "g":
$memory_limit = $matches[1] * 1073741824;

		}

		}

	}
$current_usage = memory_get_usage();
$free_memory = $memory_limit - $current_usage;

	}
$current_usage = memory_get_usage();
$free_memory = $memory_limit - $current_usage;

Zeile 178Zeile 186
	
if($thumbnail_memory > $free_memory)
{

	
if($thumbnail_memory > $free_memory)
{

		@ini_set("memory_limit", $memory_limit+$thumbnail_memory);
















		if($matches[1] && $matches[2])
{
switch($matches[2])
{
case "k":
$memory_limit = (($memory_limit+$thumbnail_memory) / 1024)."K";
break;
case "m":
$memory_limit = (($memory_limit+$thumbnail_memory) / 1048576)."M";
break;
case "g":
$memory_limit = (($memory_limit+$thumbnail_memory) / 1073741824)."G";
}
}

@ini_set("memory_limit", $memory_limit);

	}
}


	}
}