Vergleich inc/functions_image.php - 1.4.0 - 1.4.15

  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 4054 2008-07-31 05:19:05Z Tikitiki $

 * $Id: functions_image.php 5379 2011-02-21 11:06:42Z Tomm $

 */

/**

 */

/**

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 120Zeile 128
				@imagepng($thumbim, $path."/".$filename);
break;
}

				@imagepng($thumbim, $path."/".$filename);
break;
}

		@my_chmod($path."/".$filename, 0666);

		@my_chmod($path."/".$filename, '0666');

		@imagedestroy($thumbim);
$thumb['code'] = 1;
$thumb['filename'] = $filename;

		@imagedestroy($thumbim);
$thumb['code'] = 1;
$thumb['filename'] = $filename;

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);

	}
}


	}
}