Vergleich inc/functions_image.php - 1.8.3 - 1.8.20

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 11Zeile 11
/**
* Generates a thumbnail based on specified dimensions (supports png, jpg, and gif)
*

/**
* Generates a thumbnail based on specified dimensions (supports png, jpg, and gif)
*

 * @param string the full path to the original image
* @param string the directory path to where to save the new image
* @param string the filename to save the new image as
* @param integer maximum hight dimension
* @param integer maximum width dimension

 * @param string $file the full path to the original image
* @param string $path the directory path to where to save the new image
* @param string $filename the filename to save the new image as
* @param integer $maxheight maximum hight dimension
* @param integer $maxwidth maximum width dimension

 * @return array thumbnail on success, error code 4 on failure
*/
function generate_thumbnail($file, $path, $filename, $maxheight, $maxwidth)

 * @return array thumbnail on success, error code 4 on failure
*/
function generate_thumbnail($file, $path, $filename, $maxheight, $maxwidth)

Zeile 157Zeile 157
/**
* Attempts to allocate enough memory to generate the thumbnail
*

/**
* Attempts to allocate enough memory to generate the thumbnail
*

 * @param integer hight dimension
* @param integer width dimension
* @param string one of the IMAGETYPE_XXX constants indicating the type of the image
* @param string the bits area the number of bits for each color
* @param string the channels - 3 for RGB pictures and 4 for CMYK pictures


 * @param integer $width width dimension
* @param integer $height height dimension
* @param string $type one of the IMAGETYPE_XXX constants indicating the type of the image
* @param string $bitdepth the bits area the number of bits for each color
* @param string $channels the channels - 3 for RGB pictures and 4 for CMYK pictures
* @return bool

 */
function check_thumbnail_memory($width, $height, $type, $bitdepth, $channels)
{

 */
function check_thumbnail_memory($width, $height, $type, $bitdepth, $channels)
{

Zeile 177Zeile 178
	}

$limit = preg_match("#^([0-9]+)\s?([kmg])b?$#i", trim(my_strtolower($memory_limit)), $matches);

	}

$limit = preg_match("#^([0-9]+)\s?([kmg])b?$#i", trim(my_strtolower($memory_limit)), $matches);

	$memory_limit = 0;

	$memory_limit = (int)$memory_limit;

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

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

Zeile 217Zeile 218

@ini_set("memory_limit", $memory_limit);
}


@ini_set("memory_limit", $memory_limit);
}

 

return true;

}

/**
* Figures out the correct dimensions to use
*

}

/**
* Figures out the correct dimensions to use
*

 * @param integer current hight dimension
* @param integer current width dimension
* @param integer max hight dimension
* @param integer max width dimension

 * @param integer $width current width dimension
* @param integer $height current height dimension
* @param integer $maxwidth max width dimension
* @param integer $maxheight max height dimension

 * @return array correct height & width
*/
function scale_image($width, $height, $maxwidth, $maxheight)

 * @return array correct height & width
*/
function scale_image($width, $height, $maxwidth, $maxheight)