Hi. When I'm trying to save an image in image tab i'm getting blank screen. After I set my error reporting to Maximum and repeat this, I'm getting ana error:
Fatal error: Allowed memory size of 5242880 bytes exhausted (tried to allocate 3600 bytes) in /home/zrenjonl/public_html/administrator/components/com_k2/lib/class.upload.php on line 3295
I'm using Joomla 2.5.11 and K2 2.6.6
That part of code is: (I made that line (3295) red and underlined)
/**
* Creates a container image
*
* @access private
* @param integer $x Width
* @param integer $y Height
* @param boolean $fill Optional flag to draw the background color or not
* @param boolean $trsp Optional flag to set the background to be transparent
* @return resource Container image
*/
function imagecreatenew($x, $y, $fill = true, $trsp = false) {
if ($x < 1) $x = 1; if ($y < 1) $y = 1;
if ($this->gdversion() >= 2 && !$this->image_is_palette) {
// create a true color image
$dst_im = imagecreatetruecolor($x, $y);
// this preserves transparency in PNGs, in true color
if (empty($this->image_background_color) || $trsp) {
imagealphablending($dst_im, false );
imagefilledrectangle($dst_im, 0, 0, $x, $y, imagecolorallocatealpha($dst_im, 0, 0, 0, 127));
}
} else {
// creates a palette image
$dst_im = imagecreate($x, $y);
// preserves transparency for palette images, if the original image has transparency
if (($fill && $this->image_is_transparent && empty($this->image_background_color)) || $trsp) {
imagefilledrectangle($dst_im, 0, 0, $x, $y, $this->image_transparent_color);
imagecolortransparent($dst_im, $this->image_transparent_color);
}
}
// fills with background color if any is set
if ($fill && !empty($this->image_background_color) && !$trsp) {
list($red, $green, $blue) = $this->getcolors($this->image_background_color);
$background_color = imagecolorallocate($dst_im, $red, $green, $blue);
imagefilledrectangle($dst_im, 0, 0, $x, $y, $background_color);
}
return $dst_im;
}
Please help