Hi,
From admin panel I changed the maximum size of image upload to 5mb.
Now when uploading image I get following error:
26-Sep-2015 20:14:29 US/Central] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 11952 bytes) in /home/…………………………………Uploader.php on line 270
/**
*
* rotate uploaded image automatically based on exif orientation
*
* @param string $fileName
*
* @return $this
*/
protected function _imageSmartRotate($fileName)
{
$output = null;
if (function_exists('exif_read_data')) {
$exif = @exif_read_data($fileName);
if (!empty($exif['Orientation'])) {
$image = $this->_imageCreateFunction($fileName);
switch ($exif['Orientation']) {
case 3:
$output = imagerotate($image, 180, 255);
break;
case 6:
$output = imagerotate($image, -90, 255);
break;
case 8:
$output = imagerotate($image, 90, 255);
break;
}
if ($output !== null) {
touch($fileName);
imagepng($output, $fileName);
imagedestroy($output);
}
}
}
return $this;
}
/**
*
* add watermark to the image that has been uploaded
*
* @param $fileName
* @param $watermarkText
*
* @return $this
*/
The line 270 error is this one under Case 6 bold.
case 6: $output = imagerotate($image, -90, 255); break;
Anyone know what is the problem.