PMCORE-1323 Remove the possibility of change the memory_limit

This commit is contained in:
Roly Rudy Gutierrez Pinto
2020-05-25 17:11:23 -04:00
parent 283794ca23
commit af115eeee4
19 changed files with 5 additions and 62 deletions

View File

@@ -2750,11 +2750,6 @@ class G
if (!array_key_exists("channels", $imageInfo)) {
$imageInfo["channels"] = 3;
}
$memoryNeeded = Round(($imageInfo[0] * $imageInfo[1] * $imageInfo['bits'] * $imageInfo['channels'] + Pow(2, 16)) * 1.95) / (1024 * 1024);
if ($memoryNeeded < 80) {
$memoryNeeded = 80;
}
ini_set('memory_limit', intval($memoryNeeded) . 'M');
$functions = array(IMAGETYPE_GIF => array('imagecreatefromgif', 'imagegif'
), IMAGETYPE_JPEG => array('imagecreatefromjpeg', 'imagejpeg'), IMAGETYPE_PNG => array('imagecreatefrompng', 'imagepng'));